/* ============================================================
   B案 会員アプリ画面（左メニュー＋右本文の1画面）
   Cocoon の枠を使わない専用レイアウト
   ============================================================ */
.ohy-app-body {
  margin: 0; background: #ffffff; color: #1c2024;
  font-family: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.ohy-app { display: flex; min-height: 100vh; }
.ohy-app a { text-decoration: none; color: inherit; }

/* ---------- 左サイドバー ---------- */
.ohy-side {
  width: 264px; flex-shrink: 0; background: #f7f8f7;
  border-right: 1px solid #e4e7e5; padding: 24px 0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; box-sizing: border-box;
}
.ohy-brand {
  display: block; padding: 0 22px 22px; font-size: 21px;
  font-weight: 700; color: #0e6b5a; letter-spacing: .02em;
}
.ohy-nav { padding: 0 12px; }
.ohy-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.ohy-nav-item.is-current { background: #e8f0ed; color: #0e6b5a; }
.ohy-nav-ico { font-size: 15px; }

.ohy-side-label {
  padding: 22px 22px 8px; margin: 0;
  font-size: 11px; letter-spacing: .1em; color: #8a918e; text-transform: uppercase;
}
.ohy-course-nav { padding: 0 12px; flex: 1; }
.ohy-course { margin-bottom: 4px; }
.ohy-course-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.ohy-course-head:hover { background: #eef0ef; }
.ohy-dot { width: 7px; height: 7px; border-radius: 50%; background: #0e6b5a; flex-shrink: 0; }
.ohy-course-name { flex: 1; }
.ohy-course-num { font-size: 12px; color: #8a918e; }

.ohy-course-list { list-style: none; margin: 2px 0 8px; padding: 0 0 0 27px; }
.ohy-course-list a {
  display: block; padding: 6px 12px; border-radius: 6px;
  font-size: 13px; color: #5b625e;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ohy-course-list a:hover { background: #eef0ef; }
.ohy-course-list a.is-watching { background: #e8f0ed; color: #0e6b5a; font-weight: 500; }
.ohy-mini { font-size: 11px; }
.ohy-more-small { color: #8a918e !important; font-size: 12px !important; }

.ohy-side-user {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 12px 0; padding: 14px 12px 0; border-top: 1px solid #e4e7e5;
}
.ohy-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #0e6b5a; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.ohy-side-user-body { display: flex; flex-direction: column; min-width: 0; }
.ohy-side-user-name { font-size: 13px; font-weight: 500; }
.ohy-side-user-plan { font-size: 11px; color: #8a918e; }
.ohy-logout { margin-left: auto; font-size: 11px; color: #8a918e; padding: 4px 8px; border-radius: 6px; flex-shrink: 0; }
.ohy-logout:hover { background: #eef0ef; color: #0e6b5a; }

/* ---------- 右メイン ---------- */
.ohy-main { flex: 1; min-width: 0; padding: 32px 40px 64px; max-width: 1016px; }
.ohy-main-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 14px;
}
.ohy-greet { font-size: 25px; font-weight: 700; margin: 0 0 6px; }
.ohy-sub { font-size: 13px; color: #5b625e; margin: 0; }
.ohy-sub strong { color: #0e6b5a; }

.ohy-search input {
  width: 240px; padding: 9px 14px; font-size: 13px;
  border: 1px solid #e4e7e5; border-radius: 8px; background: #fff; box-sizing: border-box;
}
.ohy-search input:focus { outline: 2px solid #0e6b5a; outline-offset: -1px; }

.ohy-bar { height: 6px; background: #e4e7e5; border-radius: 999px; overflow: hidden; margin-bottom: 32px; }
.ohy-bar span { display: block; height: 100%; background: #0e6b5a; border-radius: 999px; }

/* ---------- 続きから ---------- */
.ohy-resume { margin-bottom: 36px; }
.ohy-resume-label { font-size: 12px; color: #8a918e; margin: 0 0 8px; }
.ohy-resume-card {
  display: flex; align-items: center; gap: 20px; padding: 18px;
  border: 1px solid #e4e7e5; border-radius: 12px; background: #fff;
}
.ohy-resume-thumb-wrap {
  position: relative; width: 200px; height: 112px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden; background: #dfe8e4; display: block;
}
.ohy-resume-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ohy-play {
  position: absolute; inset: 0; margin: auto; width: 42px; height: 42px;
  background: rgba(255,255,255,.92); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #0e6b5a; padding-left: 3px; box-sizing: border-box;
}
.ohy-resume-body { flex: 1; min-width: 0; }
.ohy-resume-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.ohy-resume-meta { font-size: 12px; color: #5b625e; margin: 0 0 10px; }
.ohy-mini-bar { height: 4px; background: #e4e7e5; border-radius: 999px; overflow: hidden; max-width: 320px; }
.ohy-mini-bar span { display: block; height: 100%; background: #0e6b5a; }
.ohy-btn {
  flex-shrink: 0; padding: 10px 22px; background: #0e6b5a; color: #fff !important;
  border-radius: 8px; font-size: 14px; font-weight: 500;
}
.ohy-btn:hover { background: #0a4f42; }

/* ---------- スマホ ---------- */
@media (max-width: 900px) {
  .ohy-app { flex-direction: column; }
  .ohy-side {
    width: auto; height: auto; position: static;
    border-right: 0; border-bottom: 1px solid #e4e7e5; padding: 16px 0;
  }
  .ohy-course-list { display: none; }
  .ohy-course-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .ohy-main { padding: 24px 18px 48px; }
  .ohy-main-head { flex-direction: column; }
  .ohy-search input { width: 100%; }
  .ohy-resume-card { flex-direction: column; align-items: stretch; }
  .ohy-resume-thumb-wrap { width: 100%; height: auto; aspect-ratio: 16/9; }
  .ohy-greet { font-size: 20px; }
}

/* ---------- 一覧（モックの数値に合わせる） ---------- */
.ohy-app .ohy-cat { margin-top: 38px; }
.ohy-app .ohy-cat-head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px;
}
.ohy-app .ohy-sec-title { font-size: 17px; font-weight: 700; }
.ohy-app .ohy-count { font-size: 13px; color: #8a938e; }
.ohy-app .ohy-more {
  margin-left: auto; font-size: 13px; color: #0e6b5a; font-weight: 500;
}

/* 一覧全体をひとつの角丸の枠にする */
.ohy-app .ohy-list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid #e8ebe9; border-radius: 10px; overflow: hidden;
}
.ohy-app .ohy-item { border-bottom: 1px solid #eef1ef; }
.ohy-app .ohy-item:last-child { border-bottom: 0; }
.ohy-app .ohy-item > a {
  display: flex; align-items: center; gap: 16px; padding: 13px 16px;
  border-radius: 0;
}
.ohy-app .ohy-item > a:hover { background: #f7faf9; }
.ohy-app .ohy-num {
  width: 24px; font-size: 13px; color: #a4aca7; font-weight: 500; flex-shrink: 0;
}

/* サムネイル（進捗バーを重ねられるように包む） */
.ohy-app .ohy-thumb-wrap {
  position: relative; width: 96px; height: 54px; flex-shrink: 0;
  border-radius: 5px; overflow: hidden; display: block;
}
.ohy-app .ohy-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: linear-gradient(140deg, #cddcd6, #aec4bb);
}
.ohy-app .ohy-thumb-none {
  background: #f2f4f3; border: 1px solid #e8ebe9; box-sizing: border-box;
  position: relative;
}
.ohy-app .ohy-thumb-none::after {
  content: '資料'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #8a938e;
}
/* 視聴中は下端に進み具合のバー */
.ohy-app .ohy-thumb-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; background: #0e6b5a;
}

.ohy-app .ohy-item-body { flex-grow: 1; min-width: 0; }
.ohy-app .ohy-item-title {
  display: block; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ohy-app .ohy-item-meta {
  display: block; font-size: 12px; color: #8a938e; margin-top: 3px;
}

/* 状態は「文字」で出す（丸い枠は使わない） */
.ohy-app .ohy-badge {
  flex-shrink: 0; font-size: 12px; font-weight: 700;
  background: none; padding: 0; border-radius: 0; color: #a4aca7;
}
.ohy-app .ohy-is-done .ohy-badge { color: #0e6b5a; }
.ohy-app .ohy-is-watching .ohy-badge { color: #c2620f; }
/* 視聴中の行はうっすら色を敷く */
.ohy-app .ohy-is-watching > a { background: #f6faf8; }

/* サイドバーのコース色（モックは分野ごとに色違い） */
/* コースの色（8色を順に使う。9つ目からは最初に戻る） */
.ohy-app .ohy-dot-0 { background: #0e6b5a; }
.ohy-app .ohy-dot-1 { background: #c2620f; }
.ohy-app .ohy-dot-2 { background: #2f4fa8; }
.ohy-app .ohy-dot-3 { background: #8a3fa3; }
.ohy-app .ohy-dot-4 { background: #b3261e; }
.ohy-app .ohy-dot-5 { background: #0b7a8f; }
.ohy-app .ohy-dot-6 { background: #7a6a10; }
.ohy-app .ohy-dot-7 { background: #4a5560; }

@media (max-width: 900px) {
  .ohy-app .ohy-num { display: none; }
  .ohy-app .ohy-item > a { gap: 12px; padding: 12px; }
}

/* ---------- コース画面 ---------- */
.ohy-crumb { font-size: 12px; color: #8a938e; margin: 0 0 4px; }
/* 今開いているコースは見出しを目立たせる */
.ohy-course.is-open > .ohy-course-head { background: #e8f0ed; color: #0e6b5a; font-weight: 700; }
/* 続きからカードは見出しを中に入れたので余白を調整 */
.ohy-resume .ohy-resume-label { margin: 0 0 4px; }

/* ---------- 教材ページ ---------- */
.ohy-main-lesson { max-width: 900px; }
.ohy-crumb a { color: #0e6b5a; }
.ohy-lesson-title { font-size: 25px; font-weight: 700; margin: 0 0 6px; }
.ohy-done-mark {
  margin-left: 8px; font-size: 12px; font-weight: 700; color: #0e6b5a;
}

/* 動画（画面幅に合わせて16:9を保つ） */
.ohy-player {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: 10px; overflow: hidden; margin: 20px 0 28px;
}
.ohy-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 資料（PDF） */
.ohy-pdf { margin: 20px 0 28px; }
.ohy-pdf-view {
  height: 70vh; min-height: 420px; overflow-y: auto; box-sizing: border-box;
  padding: 16px; background: #eef0ef; border: 1px solid #e8ebe9; border-radius: 10px;
}
.ohy-pdf-page { margin: 0 auto 16px; width: fit-content; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ohy-pdf-page:last-child { margin-bottom: 0; }
.ohy-pdf-page canvas { display: block; }
.ohy-pdf-loading { text-align: center; color: #8a918e; font-size: 13px; padding: 40px 0; }
.ohy-pdf-fallback { width: 100%; height: 100%; border: 0; }
.ohy-pdf-note { margin: 10px 0 0; font-size: 12px; color: #8a918e; }
.ohy-pdf-counter { margin-left: 8px; color: #8a918e; }
.ohy-pdf-link { margin-top: 14px; }

.ohy-body { font-size: 15px; line-height: 1.9; margin: 20px 0 28px; }

/* 前後の教材 */
.ohy-lesson-nav {
  display: flex; justify-content: space-between; gap: 14px; margin-bottom: 40px;
}
.ohy-lesson-nav a {
  display: flex; flex-direction: column; gap: 3px; max-width: 45%;
  padding: 12px 16px; border: 1px solid #e8ebe9; border-radius: 10px;
}
.ohy-lesson-nav a:hover { border-color: #0e6b5a; background: #f7faf9; }
.ohy-nav-next { text-align: right; margin-left: auto; }
.ohy-nav-dir { font-size: 12px; color: #8a938e; }
.ohy-nav-name {
  font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 今見ている教材を一覧内で示す */
.ohy-is-here > a { background: #e8f0ed !important; }
.ohy-is-here .ohy-badge { color: #0e6b5a; }

@media (max-width: 900px) {
  .ohy-lesson-title { font-size: 20px; }
  .ohy-lesson-nav { flex-direction: column; }
  .ohy-lesson-nav a { max-width: none; }
  .ohy-nav-next { text-align: left; }
  .ohy-pdf-view { height: 55vh; min-height: 320px; padding: 10px; }
}

/* ============================================================
   ログイン前トップ — ロゴ＋ログイン欄だけ（B案の白・緑）
   ============================================================ */
.ohy-visitor-body { background: #fff; }
.ohy-login-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px; box-sizing: border-box; color: #1c2024;
}
.ohy-login-page a { text-decoration: none; color: inherit; }
.ohy-login-page .ohy-lp-brand { font-size: 26px; font-weight: 900; letter-spacing: .06em; color: #0e6b5a; margin-bottom: 28px; }

/* ログインカード */
.ohy-login-box {
  width: 100%; max-width: 380px; background: #f7f8f7; border: 1px solid #e4e7e5;
  border-radius: 13px; padding: 32px 28px; box-sizing: border-box;
}
.ohy-login-box h1 { font-size: 18px; font-weight: 700; margin: 0; text-align: center; }
.ohy-login-err { font-size: 13px; color: #b3261e; margin: 12px 0 0; text-align: center; }
.ohy-login-box form { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.ohy-login-box form p { margin: 0; }
.ohy-login-box label { display: block; font-size: 12px; color: #5b625e; font-weight: 500; margin-bottom: 6px; }
.ohy-login-box .login-remember label { display: flex; align-items: center; gap: 8px; margin: 0; }
.ohy-login-box input[type="text"], .ohy-login-box input[type="password"], .ohy-login-box input[type="email"] {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid #cdd3d0; border-radius: 8px;
  background: #fff; font-size: 14px; box-sizing: border-box;
}
.ohy-login-box input:focus { outline: 2px solid #0e6b5a; outline-offset: -1px; }
.ohy-login-box input[type="submit"] {
  width: 100%; background: #0e6b5a; color: #fff; border: 0; border-radius: 8px;
  padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 6px;
}
.ohy-login-box input[type="submit"]:hover { background: #0a4f42; }
.ohy-login-forgot { font-size: 12px; text-align: center; margin: 14px 0 0; }
.ohy-login-forgot a { color: #8a938e; }

.ohy-login-box .ohy-login-note { font-size: 13px; color: #5b625e; line-height: 1.7; text-align: center; margin: 16px 0 0; }
.ohy-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ohy-pending-box .ohy-login-note { line-height: 1.9; }
.ohy-pending-actions { text-align: center; margin: 20px 0 0; }
.ohy-pending-actions .ohy-btn { display: inline-block; }
.ohy-login-join { font-size: 13px; color: #5b625e; margin: 22px 0 0; }
.ohy-login-join a { color: #0e6b5a; font-weight: 500; }
.ohy-lp-foot { margin-top: 48px; font-size: 12px; color: #8a938e; }

/* ---------- ホームのコースカード（コース1つ＝カード1枚） ---------- */
.ohy-app .ohy-courses {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.ohy-app .ohy-card {
  display: flex; flex-direction: column; gap: 16px; padding: 20px;
  border: 1px solid #e4e7e5; border-radius: 12px; background: #fff;
}
.ohy-app .ohy-card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ohy-app .ohy-card-name {
  font-size: 16px; font-weight: 700; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ohy-app .ohy-card-all { font-size: 12px; color: #0e6b5a; font-weight: 500; flex-shrink: 0; }
.ohy-app .ohy-card-body { display: flex; align-items: center; gap: 16px; }
.ohy-app .ohy-card-stat { flex: 1; min-width: 0; }
.ohy-app .ohy-card-count { font-size: 13px; color: #5b625e; margin: 0 0 6px; }
.ohy-app .ohy-card-count strong { font-size: 20px; color: #1c2024; }
.ohy-app .ohy-card-next {
  font-size: 12px; color: #5b625e; margin: 0; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ohy-app .ohy-card-next-label { color: #8a918e; }
.ohy-app .ohy-card-left { display: block; color: #c2620f; }
.ohy-app .ohy-card-btn { display: block; text-align: center; margin-top: auto; }
.ohy-app .ohy-card-btn.ohy-btn-ghost { background: #fff; color: #5b625e !important; border: 1px solid #e4e7e5; }
.ohy-app .ohy-card-btn.ohy-btn-ghost:hover { border-color: #0e6b5a; color: #0e6b5a !important; }
.ohy-app .is-complete .ohy-card-count strong { color: #0e6b5a; }

/* 円グラフ。線の色はコースの色（currentColor） */
.ohy-app .ohy-ring { flex-shrink: 0; transform: rotate(-90deg); }
.ohy-app .ohy-ring-bg { fill: none; stroke: #e4e7e5; stroke-width: 7; }
.ohy-app .ohy-ring-fg {
  fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round;
}
.ohy-app .ohy-ring-num {
  font-size: 18px; font-weight: 700; fill: #1c2024;
  transform: rotate(90deg); transform-origin: 42px 42px;
}
.ohy-app .ohy-ring-unit { font-size: 11px; font-weight: 500; fill: #8a918e; }

/* コースの色（サイドバーの点と同じ8色） */
.ohy-app .ohy-tone-0 { color: #0e6b5a; }
.ohy-app .ohy-tone-1 { color: #c2620f; }
.ohy-app .ohy-tone-2 { color: #2f4fa8; }
.ohy-app .ohy-tone-3 { color: #8a3fa3; }
.ohy-app .ohy-tone-4 { color: #b3261e; }
.ohy-app .ohy-tone-5 { color: #0b7a8f; }
.ohy-app .ohy-tone-6 { color: #7a6a10; }
.ohy-app .ohy-tone-7 { color: #4a5560; }
/* 文字色は色に引っ張られないよう戻す */
.ohy-app .ohy-card .ohy-card-name, .ohy-app .ohy-card .ohy-card-count,
.ohy-app .ohy-card .ohy-card-next { color: inherit; }
.ohy-app .ohy-card .ohy-card-name { color: #1c2024; }
.ohy-app .ohy-card .ohy-card-count, .ohy-app .ohy-card .ohy-card-next { color: #5b625e; }
