@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;600&family=Noto+Sans+JP:wght@300;400;500&display=swap');

:root {
  --bg: #F8F4EF;
  --surface: #FFFFFF;
  --border: #E5DDD5;
  --text-primary: #3C332C;
  --text-secondary: #8A7B70;
  --accent: #B5896A;
  --accent-light: #F0E4D7;
  --accent-dark: #9A7055;
  --sage: #7B9E82;
  --sage-light: #E8F0EA;
  --shadow: 0 2px 16px rgba(60,51,44,0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3 { font-family: 'Noto Serif JP', serif; font-weight: 600; }

/* ── Login ── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-logo { margin-bottom: 40px; text-align: center; }
.login-logo h1 { font-size: 24px; color: var(--accent); letter-spacing: 0.12em; }
.login-logo p { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
}

/* ── Form ── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 400; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 80px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  gap: 6px;
}
.btn-primary { background: var(--accent); color: white; width: 100%; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--accent-light); color: var(--accent-dark); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: #FEE2E2; color: #DC2626; font-size: 12px; padding: 6px 12px; border-radius: 6px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--text-secondary); font-size: 13px; padding: 6px 0; }

/* ── Messages ── */
.message { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; }
.message-error { background: #FEE2E2; color: #DC2626; }
.message-success { background: var(--sage-light); color: #2D6A4F; }

/* ── Header ── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-name { font-family: 'Noto Serif JP', serif; font-size: 17px; color: var(--accent); letter-spacing: 0.1em; }
.user-name { font-size: 13px; color: var(--text-secondary); }

/* ── Main ── */
.main { padding: 28px 20px 80px; max-width: 600px; margin: 0 auto; }

/* ── Section ── */
.section { margin-bottom: 28px; }
.section-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
}

/* ── Theme card ── */
.theme-card {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 28px;
  border-left: 4px solid var(--accent);
}
.theme-card h2 { font-size: 20px; color: var(--accent-dark); margin-bottom: 12px; }
.theme-card p { font-size: 15px; color: var(--text-primary); line-height: 1.9; }

/* ── Zoom card ── */
.zoom-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.zoom-icon {
  width: 46px; height: 46px;
  background: #2D8CFF;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.zoom-info { flex: 1; }
.zoom-info h3 { font-size: 15px; margin-bottom: 3px; }
.zoom-info p { font-size: 13px; color: var(--text-secondary); }
.zoom-btn {
  background: #2D8CFF; color: white;
  padding: 10px 18px; border-radius: 8px;
  font-size: 13px; text-decoration: none;
  font-family: 'Noto Sans JP', sans-serif; font-weight: 500;
  flex-shrink: 0; white-space: nowrap;
}

/* ── List items ── */
.list-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 4px rgba(60,51,44,0.06);
  text-decoration: none; color: inherit;
  transition: box-shadow 0.2s;
}
.list-item:hover { box-shadow: 0 4px 16px rgba(60,51,44,0.12); }
.list-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.list-icon.video { background: #FEE2E2; }
.list-icon.pdf { background: var(--sage-light); }
.list-content { flex: 1; }
.list-content h3 { font-size: 14px; font-weight: 500; font-family: 'Noto Sans JP', sans-serif; margin-bottom: 2px; }
.list-content p { font-size: 12px; color: var(--text-secondary); }
.list-arrow { color: var(--border); font-size: 20px; }

/* ── Announcement ── */
.announcement-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 18px 20px; margin-bottom: 10px;
  border-left: 3px solid var(--sage);
  box-shadow: 0 1px 4px rgba(60,51,44,0.06);
}
.announcement-item h3 { font-size: 15px; font-weight: 500; font-family: 'Noto Sans JP', sans-serif; margin-bottom: 6px; }
.announcement-item p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.announcement-date { font-size: 11px; color: var(--border); margin-top: 8px; }

/* ── States ── */
.empty-state { text-align: center; padding: 32px; color: var(--text-secondary); font-size: 14px; }
.loading { text-align: center; padding: 60px; color: var(--text-secondary); font-size: 14px; }

/* ── Admin ── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 10px 12px; font-size: 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border); font-weight: 500; }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-video { background: #FEE2E2; color: #DC2626; }
.badge-pdf { background: var(--sage-light); color: #2D6A4F; }
.badge-theme { background: var(--accent-light); color: var(--accent-dark); }
.badge-zoom { background: #DBEAFE; color: #1D4ED8; }
.badge-announcement { background: #F3E8FF; color: #7C3AED; }

.tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--border); border-radius: var(--radius-sm); padding: 4px; }
.tab { flex: 1; padding: 10px; text-align: center; border: none; background: transparent; border-radius: 8px; font-family: 'Noto Sans JP', sans-serif; font-size: 13px; cursor: pointer; color: var(--text-secondary); transition: all 0.2s; }
.tab.active { background: var(--surface); color: var(--text-primary); font-weight: 500; box-shadow: 0 1px 4px rgba(60,51,44,0.08); }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: flex-end; justify-content: center; z-index: 200; }
.modal { background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; padding: 28px 24px 40px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 17px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* ── Utils ── */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-secondary); }
