/* aruku Pilates Studio — お客様自主トレサイト スタイル */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

:root {
  --pink:        #d37d9f;
  --pink-light:  #f0cdd9;
  --pink-dark:   #9e5e77;
  --pink-pale:   #fdf3f7;
  --gray:        #9E9B9E;
  --gray-light:  #F2F0F1;
  --dark:        #2A2828;
  --text:        #4A4747;
  --white:       #FFFFFF;
  --bg:          #F7F4F5;
  --border:      #E8E3E5;
  --shadow-sm:   0 2px 8px rgba(60,40,50,.07);
  --shadow:      0 6px 28px rgba(60,40,50,.10);
  --radius:      16px;
  --radius-sm:   10px;
  --transition:  0.22s cubic-bezier(0.4,0,0.2,1);
  --bottom-nav:  64px;
}

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

body {
  font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pink); text-decoration: none; }
a:hover { color: var(--pink-dark); }
button { cursor: pointer; border: none; font-family: inherit; }

/* =====================================================
   APP SHELL — サイドバー + メインの2カラム
===================================================== */
:root {
  --sb-width: 220px;
  --sb-bg:    #3d2b33;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── サイドバー本体 ── */
.sidebar {
  width: var(--sb-width);
  min-width: var(--sb-width);
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(211,125,159,.25) transparent;
  transition: transform 0.26s cubic-bezier(0.4,0,0.2,1);
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(211,125,159,.25); border-radius: 2px; }

/* ── ブランドロゴ ── */
.sb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sb-logo-mark {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(211,125,159,.5);
  display: flex; align-items: center; justify-content: center;
  background: rgba(211,125,159,.08); flex-shrink: 0;
}
.sb-logo-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px; font-weight: 600; font-style: italic;
  color: var(--pink); line-height: 1;
}
.sb-brand-text { display: flex; flex-direction: column; gap: 2px; }
.sb-brand-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px; font-weight: 600; font-style: italic;
  color: #fff; letter-spacing: 0.08em; line-height: 1;
}
.sb-brand-sub {
  font-size: 8px; font-weight: 700; letter-spacing: 0.28em;
  text-transform: uppercase; color: rgba(255,255,255,.35); line-height: 1;
}

/* ── ユーザー情報 ── */
.sb-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sb-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(211,125,159,.35);
}
.sb-user-info { min-width: 0; }
.sb-user-name {
  font-size: 13px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.sb-user-sub {
  font-size: 10px; color: rgba(255,255,255,.45);
  letter-spacing: 0.04em; margin-top: 2px;
}

/* ── ナビゲーション ── */
.sb-nav {
  flex: 1;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}
.sb-section-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
  padding: 14px 18px 7px;
}
.sb-separator {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 6px 14px;
}
.sb-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  margin-right: 8px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border-top: none; border-bottom: none; border-right: none;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  width: calc(100% - 8px);
  box-sizing: border-box;
}
.sb-nav-item:hover {
  background: rgba(211,125,159,.1);
  border-left-color: rgba(211,125,159,.35);
}
.sb-nav-item.active {
  background: rgba(211,125,159,.18);
  border-left-color: var(--pink);
}
.sb-nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
  transition: color 0.2s;
}
.sb-nav-item:hover .sb-nav-icon,
.sb-nav-item.active .sb-nav-icon { color: var(--pink); }
.sb-nav-label {
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: color 0.2s;
}
.sb-nav-item:hover .sb-nav-label,
.sb-nav-item.active .sb-nav-label { color: #fff; }

/* ── フッター ── */
.sb-footer {
  padding: 12px 14px 20px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sb-admin-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px; font-weight: 700;
  color: var(--pink);
  text-decoration: none;
  transition: background 0.18s;
}
.sb-admin-link:hover { background: rgba(211,125,159,.12); color: var(--pink); }
.sb-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: rgba(255,255,255,.6);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}
.sb-logout:hover {
  background: rgba(211,125,159,.15);
  border-color: var(--pink);
  color: #fff;
}

/* ── モバイルオーバーレイ ── */
.sb-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(61,43,51,.5);
  z-index: 190;
  backdrop-filter: blur(2px);
}
.sb-overlay.show { display: block; }

/* ── メインラッパー ── */
.main-wrapper {
  flex: 1;
  margin-left: var(--sb-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── モバイルトップバー ── */
.mobile-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 56px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  flex-shrink: 0;
}
.hamburger {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: none;
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; padding: 0; cursor: pointer;
  transition: all 0.18s; flex-shrink: 0;
}
.hamburger:hover { border-color: var(--pink); background: var(--pink-pale); }
.hamburger span {
  display: block; width: 15px; height: 1.5px;
  background: var(--dark); border-radius: 1px;
}
.mb-logo-wrap {
  display: flex; align-items: center; gap: 7px;
}
.mb-logo-mark {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(211,125,159,.45);
  display: flex; align-items: center; justify-content: center;
  background: rgba(211,125,159,.06); flex-shrink: 0;
}
.mb-logo-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px; font-weight: 600; font-style: italic;
  color: var(--dark); letter-spacing: 0.07em;
}
.mobile-bar-user {
  margin-left: auto;
  display: flex; align-items: center; gap: 7px;
}
.mobile-bar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.mobile-bar-name {
  font-size: 12px; font-weight: 600; color: var(--dark);
  max-width: 80px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* =====================================================
   LOGIN PAGE — コンパクト化
===================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--white);
}

.login-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-logo {
  width: 100px;
  height: auto;
  margin-bottom: 6px;
}

.login-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--gray);
  display: block;
  margin-bottom: 20px;
}

.login-card h2 {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 18px;
  color: var(--dark);
}

.form-group {
  margin-bottom: 12px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  color: var(--dark);
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-group input:focus { border-color: var(--pink); }

.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--pink);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition);
  margin-top: 6px;
  min-height: 52px;
}

.btn-primary:hover   { background: var(--pink-dark); }
.btn-primary:active  { transform: scale(0.98); }
.btn-primary:disabled { background: var(--gray); cursor: not-allowed; }

.login-error {
  display: none;
  color: #c62828;
  font-size: 13px;
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff5f5;
  border-radius: var(--radius-sm);
  border: 1px solid #ffcdd2;
  text-align: left;
}

.login-note {
  margin-top: 16px;
  font-size: 11px;
  color: var(--gray);
  line-height: 1.8;
}

/* =====================================================
   HEADER
===================================================== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo img {
  height: 28px;
  width: auto;
}

.header-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gray);
}

/* デスクトップナビ（スマホでは非表示） */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a, .header-nav button {
  font-size: 13px;
  color: var(--gray);
  padding: 6px 12px;
  border-radius: 20px;
  background: none;
  transition: all var(--transition);
  min-height: 36px;
  display: flex;
  align-items: center;
}

.header-nav a:hover, .header-nav button:hover {
  background: var(--pink-pale);
  color: var(--pink-dark);
}

.header-nav a.active {
  background: var(--pink-pale);
  color: var(--pink-dark);
  font-weight: 500;
}

.header-member-name {
  font-size: 13px;
  color: var(--dark);
  font-weight: 500;
}

/* =====================================================
   ボトムタブナビ（スマホ専用）
===================================================== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav);
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 200;
  justify-content: space-around;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--gray);
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  padding: 8px 0 6px;
  transition: color var(--transition);
  min-height: 56px;
}

.bottom-nav-item.active { color: var(--pink-dark); }

.bottom-nav-icon {
  font-size: 22px;
  line-height: 1;
}

.bottom-nav-label { font-size: 10px; font-weight: 500; }

/* =====================================================
   MAIN LAYOUT
===================================================== */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

/* =====================================================
   HERO / GREETING
===================================================== */
.hero {
  background: var(--pink-pale);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  border: 1px solid var(--pink-light);
}

.hero-greeting {
  font-size: 12px;
  color: var(--pink-dark);
  margin-bottom: 2px;
  font-weight: 500;
}

.hero-name {
  font-size: 20px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 14px;
}

.hero-name span { color: var(--pink); }

/* =====================================================
   PRESCRIPTION CARD
===================================================== */
.prescription-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.prescription-card h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-from {
  font-size: 11px;
  background: var(--pink-pale);
  color: var(--pink-dark);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.comment-block {
  background: var(--pink-pale);
  border-left: 3px solid var(--pink);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 10px 0;
  font-size: 14px;
  color: var(--pink-dark);
  line-height: 1.7;
}

.comment-block .comment-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

/* =====================================================
   VIDEO LIST ITEMS
===================================================== */
.video-list { list-style: none; }

.video-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  min-height: 72px;
}

.video-item:last-child { border-bottom: none; }

.video-item:hover,
.video-item:active {
  background: var(--pink-pale);
  margin: 0 -10px;
  padding: 14px 10px;
  border-radius: var(--radius-sm);
}

.video-item-locked {
  cursor: default;
  opacity: 0.6;
}

.video-item-locked:hover,
.video-item-locked:active {
  background: none;
  margin: 0;
  padding: 14px 0;
}

.video-item-thumb {
  width: 56px;
  height: 44px;
  background: var(--gray-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.play-icon {
  width: 24px;
  height: 24px;
  background: var(--pink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-icon svg { width: 10px; height: 10px; fill: white; margin-left: 2px; }

.video-item-done .video-item-thumb { background: #e8f5e9; }
.video-item-done .play-icon { background: #4caf50; }

.video-item-info { flex: 1; min-width: 0; }

.video-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.video-item-done .video-item-title { color: var(--gray); text-decoration: line-through; }

.video-item-meta {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.video-item-check {
  font-size: 18px;
  color: #4caf50;
  flex-shrink: 0;
  font-weight: 700;
}

.badge-pending {
  font-size: 10px;
  background: var(--gray-light);
  color: var(--gray);
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 500;
}

/* =====================================================
   CATEGORY GRID & SECTION (Library 2階層)
===================================================== */
.section-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 16px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.category-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}

.category-card:hover,
.category-card:active {
  border-color: var(--pink);
  background: var(--pink-pale);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.category-icon { font-size: 30px; }

.category-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
}

.category-count {
  font-size: 11px;
  color: var(--gray);
}

.category-progress {
  width: 100%;
  background: var(--border);
  border-radius: 99px;
  height: 3px;
  margin-top: 4px;
}

.category-progress-fill {
  height: 3px;
  border-radius: 99px;
  background: var(--pink);
  transition: width 0.5s ease;
}

/* カテゴリ動画一覧パネル */
.cat-video-panel {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
}

.cat-video-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--pink-pale);
  border-bottom: 1px solid var(--pink-light);
  cursor: pointer;
}

.cat-video-panel-header-icon { font-size: 24px; }

.cat-video-panel-header-info { flex: 1; }
.cat-video-panel-header-info h3 { font-size: 15px; font-weight: 500; color: var(--dark); }
.cat-video-panel-header-info p  { font-size: 12px; color: var(--pink-dark); }

.cat-video-panel-back {
  font-size: 13px;
  color: var(--pink-dark);
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 500;
}

.cat-video-panel-body { padding: 0 18px; }

/* =====================================================
   PROGRESS RING
===================================================== */
.progress-ring-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-ring-svg { transform: rotate(-90deg); }
.progress-ring-track { fill: none; stroke: rgba(211,125,159,0.2); stroke-width: 6; }
.progress-ring-fill  {
  fill: none; stroke: var(--pink); stroke-width: 6; stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.progress-label {
  font-size: 24px;
  font-weight: 500;
  color: var(--dark);
}

.progress-label span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--pink-dark);
}

/* =====================================================
   VIDEO PLAYER PAGE
===================================================== */
.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}

.video-container iframe, .video-container video {
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.video-placeholder-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #888;
}

.lesson-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.lesson-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--gray-light);
  color: var(--gray);
  font-weight: 500;
}

.tag-pink {
  background: var(--pink-pale);
  color: var(--pink-dark);
}

.btn-done {
  width: 100%;
  padding: 17px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 10px;
  min-height: 54px;
}

.btn-done:active { transform: scale(0.98); }

.btn-done-off {
  background: var(--pink);
  color: var(--white);
}

.btn-done-on {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1.5px solid #a5d6a7;
}

.btn-back {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--gray-light);
  color: var(--gray);
  min-height: 48px;
}

/* =====================================================
   ADMIN
===================================================== */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.admin-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 44px;
}

.admin-tab.active {
  color: var(--pink-dark);
  border-bottom-color: var(--pink);
}

.member-table {
  width: 100%;
  border-collapse: collapse;
}

.member-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.08em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.member-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  vertical-align: middle;
}

.member-table tr:last-child td { border-bottom: none; }
.member-table tr:hover td { background: var(--pink-pale); }

.status-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 10px;
  font-weight: 500;
}

.status-active   { background: #e8f5e9; color: #2e7d32; }
.status-inactive { background: #ffebee; color: #c62828; }

.btn-sm {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
  min-height: 36px;
}

.btn-pink    { background: var(--pink); color: var(--white); }
.btn-pink:hover { background: var(--pink-dark); }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--pink); color: var(--pink-dark); }
.btn-danger  { background: #ffebee; color: #c62828; }
.btn-danger:hover { background: #c62828; color: var(--white); }

.prescription-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 14px;
}

.prescription-panel h4 {
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 14px;
}

.video-check-list {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.video-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  min-height: 48px;
}

.video-check-item:last-child { border-bottom: none; }
.video-check-item:hover { background: var(--pink-pale); }
.video-check-item.checked { background: var(--pink-pale); }

.video-check-item input[type="checkbox"] {
  accent-color: var(--pink);
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.video-check-item label { font-size: 13px; color: var(--text); cursor: pointer; flex: 1; }
.video-check-item .meta { font-size: 11px; color: var(--gray); white-space: nowrap; }

.comment-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
  color: var(--dark);
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.comment-textarea:focus { border-color: var(--pink); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42,40,40,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}

.modal h3 { font-size: 17px; font-weight: 500; margin-bottom: 18px; color: var(--dark); }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions button {
  flex: 1;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  min-height: 48px;
}

/* =====================================================
   EMPTY STATE
===================================================== */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.empty-state-icon { font-size: 40px; margin-bottom: 14px; }

.empty-state h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 20px;
}

.btn-cta {
  display: inline-block;
  padding: 14px 28px;
  background: var(--pink);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px;
  text-decoration: none;
  transition: background var(--transition);
}

.btn-cta:hover { background: var(--pink-dark); color: var(--white); }

/* =====================================================
   TOAST
===================================================== */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 9999;
  transition: transform 0.3s ease;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* =====================================================
   DASHBOARD — KPI CARDS
===================================================== */
.dash-section {
  margin-bottom: 20px;
}

.dash-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.kpi-card.kpi-pink::before   { background: linear-gradient(90deg, var(--pink), var(--pink-light)); }
.kpi-card.kpi-green::before  { background: linear-gradient(90deg, #4caf50, #81c784); }
.kpi-card.kpi-blue::before   { background: linear-gradient(90deg, #1976d2, #64b5f6); }
.kpi-card.kpi-warn::before   { background: linear-gradient(90deg, #f57c00, #ffb74d); }

.kpi-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 6px;
}

.kpi-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  color: var(--dark);
  margin-bottom: 3px;
}

.kpi-value.pink  { color: var(--pink); }
.kpi-value.green { color: #2e7d32; }
.kpi-value.blue  { color: #1565c0; }
.kpi-value.warn  { color: #e65100; }

.kpi-sub {
  font-size: 11px;
  color: var(--gray);
}

.kpi-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}

.kpi-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.kpi-pink  .kpi-bar-fill { background: linear-gradient(90deg, var(--pink), var(--pink-light)); }
.kpi-green .kpi-bar-fill { background: linear-gradient(90deg, #4caf50, #81c784); }
.kpi-blue  .kpi-bar-fill { background: linear-gradient(90deg, #1976d2, #64b5f6); }
.kpi-warn  .kpi-bar-fill { background: linear-gradient(90deg, #f57c00, #ffb74d); }

/* Continue card — "次に見る" */
.continue-card {
  background: linear-gradient(135deg, var(--dark) 0%, #5a3648 100%);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(42,40,40,0.18);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.continue-card:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(42,40,40,0.25); }

.continue-card::before {
  content: 'NEXT';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px; font-weight: 600;
  color: rgba(255,255,255,0.04);
  pointer-events: none; user-select: none;
}

.continue-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(211,125,159,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.continue-info { flex: 1; min-width: 0; }

.continue-meta {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--pink-light); margin-bottom: 3px;
}

.continue-title {
  font-size: 14px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}

.continue-cat { font-size: 11px; color: rgba(255,255,255,0.6); }

.continue-arrow {
  font-size: 20px; color: var(--pink-light); flex-shrink: 0;
}

/* Admin dashboard — require follow list */
.follow-list { list-style: none; }

.follow-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.follow-item:last-child { border-bottom: none; }

.follow-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}

.follow-info { flex: 1; min-width: 0; }
.follow-name { font-size: 14px; font-weight: 500; color: var(--dark); }
.follow-sub  { font-size: 11px; color: var(--gray); }

.follow-badge {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 10px;
  font-weight: 500;
}

.follow-badge-new     { background: #fff3e0; color: #e65100; }
.follow-badge-silent  { background: var(--gray-light); color: var(--gray); }
.follow-badge-ok      { background: #e8f5e9; color: #2e7d32; }

/* Quick action buttons */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-quick {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
  transition: all var(--transition);
  cursor: pointer;
  font-family: inherit;
  min-height: 40px;
}

.btn-quick:hover {
  border-color: var(--pink);
  color: var(--pink-dark);
  background: var(--pink-pale);
}

.btn-quick-icon { font-size: 16px; }

/* =====================================================
   RESPONSIVE
===================================================== */
/* サイドバー用レスポンシブ — 768px以下でドロワー化 */
@media (max-width: 768px) {
  .sidebar { transform: translateX(calc(-1 * var(--sb-width))); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(61,43,51,.3); }
  .main-wrapper { margin-left: 0; }
  .mobile-bar { display: flex; }
  /* 旧ヘッダーはサイドバー有り時は非表示 */
  .header { display: none; }
}

@media (max-width: 640px) {
  .bottom-nav { display: flex; }
  .main { padding: 16px 14px calc(var(--bottom-nav) + 20px); }
  .hero { padding: 16px; }
  .kpi-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kpi-value { font-size: 22px; }
  .kpi-label { font-size: 9px; }
  .kpi-card  { padding: 12px 10px 10px; }
  .continue-card { padding: 14px 16px; }
  .quick-actions { gap: 8px; }
  .btn-quick { padding: 9px 14px; font-size: 12px; }
}

@media (min-width: 641px) {
  .bottom-nav { display: none; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

/* デスクトップでは旧ヘッダーを非表示（サイドバーに代替） */
@media (min-width: 769px) {
  .header { display: none; }
}
