/* ============================================================
   BUYMO 加盟店アカデミー / コミュニティ / チャットボット
   （portal系：buymo.css + board.css を継承）
   ============================================================ */

/* 全体進捗 */
.ac-overall{background:#fff;border-radius:14px;box-shadow:var(--shadow);padding:18px 22px;margin-bottom:24px;}
.ac-overall-head{display:flex;justify-content:space-between;align-items:center;font-weight:700;margin-bottom:10px;}
.ac-overall-head strong{font-size:24px;color:var(--orange);}
.ac-overall-bar{background:#eef1f6;border-radius:30px;height:14px;overflow:hidden;}
.ac-overall-bar span{display:block;height:100%;background:linear-gradient(90deg,#FF8552,#F2591F);border-radius:30px;transition:width .5s;}

.ac-h2{font-size:18px;font-weight:900;color:var(--navy);margin:26px 0 14px;}

/* コースカード */
.ac-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
.ac-card{display:block;background:#fff;border-radius:14px;box-shadow:var(--shadow);padding:22px;transition:transform .2s,box-shadow .2s;}
.ac-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-hover);}
.ac-ico{width:56px;height:56px;border-radius:14px;background:linear-gradient(135deg,#FFF1E6,#FFE3D0);display:flex;align-items:center;justify-content:center;font-size:28px;margin-bottom:12px;}
.ac-card h3{font-size:17px;font-weight:700;margin-bottom:4px;}
.ac-card p{font-size:13px;color:#777;margin-bottom:14px;min-height:36px;}
.ac-bar{background:#eef1f6;border-radius:30px;height:8px;overflow:hidden;margin-bottom:6px;}
.ac-bar span{display:block;height:100%;background:#22a34a;border-radius:30px;}
.ac-meta{font-size:12px;color:#888;font-weight:700;}

.ac-links{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;}
.ac-links a{background:var(--cream);border:1px solid #f0e2cf;border-radius:10px;padding:14px 16px;font-weight:700;font-size:14px;transition:transform .15s,color .15s;}
.ac-links a:hover{transform:translateX(3px);color:var(--orange);}

/* 受講画面 */
.cv-layout{display:grid;grid-template-columns:260px 1fr;gap:20px;align-items:start;}
.cv-side{background:#fff;border-radius:14px;box-shadow:var(--shadow);padding:16px;}
.cv-prog-label{font-weight:700;font-size:13px;color:#666;margin-bottom:10px;}
.cv-list{display:flex;flex-direction:column;gap:6px;}
.cv-list li{list-style:none;display:flex;align-items:center;gap:10px;padding:10px;border-radius:8px;cursor:pointer;font-size:14px;font-weight:700;}
.cv-list li:hover{background:#f5f7fb;}
.cv-list li.active{background:#FFF1E6;color:var(--orange);}
.cv-list li.done{color:#15803d;}
.cv-check{width:24px;height:24px;border-radius:50%;background:#eef1f6;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:900;flex:0 0 auto;}
.cv-list li.done .cv-check{background:#22a34a;color:#fff;}
.cv-main{background:#fff;border-radius:14px;box-shadow:var(--shadow);padding:24px;}
.cv-main h2{font-size:20px;font-weight:900;margin-bottom:16px;}
.cv-video{position:relative;padding-top:56.25%;border-radius:12px;overflow:hidden;background:#000;margin-bottom:16px;}
.cv-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}
.cv-video.placeholder{padding-top:0;height:220px;background:linear-gradient(135deg,#1E3A8A,#0e1f52);color:#9fb0e0;display:flex;align-items:center;justify-content:center;font-weight:700;}
.cv-text{font-size:15px;line-height:1.9;color:#444;}
.cv-complete{margin-top:20px;width:100%;height:50px;border:none;border-radius:10px;background:var(--orange);color:#fff;font-weight:900;font-size:15px;cursor:pointer;}
.cv-complete.is-done{background:#22a34a;}

/* 修了バッジ・クイズCTA */
.ac-badge{margin-left:8px;background:#E3F7E8;color:#15803d;font-size:11px;font-weight:900;border-radius:30px;padding:2px 8px;vertical-align:middle;}
.cv-quiz{margin-top:14px;background:#FFF8EC;border:1px solid #FFE2B8;border-radius:10px;padding:14px;font-weight:700;font-size:14px;text-align:center;}
.cv-quiz a{color:var(--orange);}
.cv-quiz-btn{display:inline-block;background:var(--orange);color:#fff !important;font-weight:900;border-radius:30px;padding:10px 20px;margin-top:8px;text-decoration:none;}

/* クイズ */
.quiz-form{max-width:720px;}
.quiz-q{background:#fff;border-radius:12px;box-shadow:var(--shadow);padding:18px 20px;margin-bottom:14px;}
.quiz-qt{font-weight:700;font-size:15px;margin-bottom:10px;}
.quiz-opt{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #eee;border-radius:8px;margin-bottom:8px;cursor:pointer;font-size:14px;}
.quiz-opt:hover{background:#f7f8fb;}
.quiz-submit{width:100%;height:50px;border:none;border-radius:10px;background:var(--orange);color:#fff;font-weight:900;font-size:15px;cursor:pointer;}
.quiz-result{margin-top:16px;border-radius:12px;padding:18px;text-align:center;font-weight:900;font-size:16px;}
.quiz-result.pass{background:#E3F7E8;color:#15803d;}
.quiz-result.fail{background:#FDECEC;color:#c0392b;}
.quiz-retry{display:block;margin:10px auto 0;border:1px solid #c0392b;color:#c0392b;background:#fff;border-radius:30px;padding:8px 18px;font-weight:700;cursor:pointer;}

/* 修了証 */
.cert{max-width:720px;margin:10px auto 0;background:#fff;border:3px solid var(--navy);border-radius:16px;padding:40px;text-align:center;
  background-image:radial-gradient(circle at 12% 12%, #FFF3E9 0, transparent 40%),radial-gradient(circle at 88% 88%, #eef2ff 0, transparent 40%);}
.cert-mark{font-weight:900;color:var(--orange);letter-spacing:.1em;}
.cert-title{font-size:34px;font-weight:900;color:var(--navy);letter-spacing:.3em;margin:10px 0 18px;}
.cert-lead{color:#555;font-size:14px;}
.cert-name{font-size:28px;font-weight:900;border-bottom:2px solid var(--orange);display:inline-block;padding:6px 24px;margin:16px 0;}
.cert-course{font-size:17px;font-weight:700;margin-bottom:18px;}
.cert-row{display:flex;justify-content:space-between;max-width:520px;margin:6px auto;font-size:13px;color:#555;}
.cert-actions{text-align:center;margin-top:20px;}
.cert-back{margin-left:14px;font-weight:700;color:var(--navy);}
.cert-none{text-align:center;color:#666;padding:40px 0;}
@media print{
  .no-print,.portal-header,.cert-actions{display:none !important;}
  .portal-main{background:#fff;padding:0;}
  .cert{border-color:#1E3A8A;}
}

/* お知らせバナー（加盟店ページ上部） */
.notice-bar{display:flex;align-items:flex-start;gap:12px;border-radius:12px;padding:14px 16px;margin-bottom:18px;font-size:14px;}
.notice-bar.info{background:#E8F1FF;border:1px solid #C7DBFF;color:#1d4ed8;}
.notice-bar.warn{background:#FFF4E5;border:1px solid #FFD9A8;color:#9A5B00;}
.notice-bar .nb-ico{font-size:18px;}
.notice-bar .nb-body{flex:1;color:#333;}
.notice-bar .nb-body strong{color:inherit;}
.notice-bar .nb-more{font-size:12px;color:#888;}
.notice-bar .nb-x{border:none;background:none;font-size:20px;cursor:pointer;color:#888;line-height:1;}

/* お知らせ管理（本部） */
.notice-admin{display:flex;flex-direction:column;gap:12px;}
.na-card{background:#fff;border-radius:12px;box-shadow:var(--shadow);padding:16px 18px;border-left:5px solid #3b82f6;}
.na-card.warn{border-left-color:#f59e0b;}
.na-head{display:flex;align-items:center;gap:10px;}
.na-lv{font-size:11px;font-weight:900;color:#fff;background:#3b82f6;border-radius:30px;padding:2px 10px;}
.na-card.warn .na-lv{background:#f59e0b;}
.na-date{font-size:12px;color:#999;margin-left:4px;}
.na-del{margin-left:auto;border:1px solid #ddd;background:#fff;border-radius:8px;padding:4px 12px;font-size:12px;font-weight:700;color:#c0392b;cursor:pointer;}
.na-card p{font-size:14px;color:#555;margin-top:8px;}

/* スクリプト集 */
.sc-group{margin-bottom:24px;}
.sc-group h2{font-size:16px;font-weight:900;color:var(--navy);margin-bottom:12px;}
.sc-card{background:#fff;border-radius:12px;box-shadow:var(--shadow);padding:16px 18px;margin-bottom:12px;}
.sc-card-head{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.sc-card-head strong{font-size:15px;}
.sc-copy{margin-left:auto;border:1px solid var(--orange);color:var(--orange);background:#fff;border-radius:30px;padding:5px 14px;font-weight:700;font-size:13px;cursor:pointer;}
.sc-copy:hover{background:var(--orange);color:#fff;}
.sc-card p{font-size:14px;color:#444;line-height:1.8;}

/* コミュニティ */
.cm-post{background:#fff;border-radius:14px;box-shadow:var(--shadow);padding:18px;margin-bottom:20px;display:flex;flex-direction:column;gap:10px;}
.cm-post input,.cm-post textarea{border:1px solid #ddd;border-radius:8px;padding:10px 12px;font-size:14px;font-family:inherit;}
.cm-post .btn{align-self:flex-end;}
.cm-list{display:flex;flex-direction:column;gap:14px;}
.cm-card{background:#fff;border-radius:14px;box-shadow:var(--shadow);padding:18px 20px;}
.cm-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;}
.cm-who{font-weight:700;color:var(--navy);font-size:14px;}
.cm-time{font-size:12px;color:#999;}
.cm-card h3{font-size:16px;font-weight:700;margin-bottom:6px;}
.cm-card p{font-size:14px;color:#444;line-height:1.8;margin-bottom:10px;}
.cm-like{border:none;background:#f1f3f8;border-radius:30px;padding:6px 14px;font-size:13px;font-weight:700;color:#555;cursor:pointer;}
.cm-like:hover{background:#e6e9f2;}

@media (max-width:991px){.ac-grid{grid-template-columns:repeat(2,1fr);}.cv-layout{grid-template-columns:1fr;}}
@media (max-width:767px){.ac-grid,.ac-links{grid-template-columns:1fr;}}

/* ============ チャットボット v2（AI対応） ============ */
/* --bot-accent: ポータルは --orange、一般サイトは --green にフォールバック */
:root{--bot-accent:var(--orange,var(--green,#0EA05B));--bot-head:var(--navy,var(--green-dark,#0A6B3C));}

.cbot{position:fixed;right:24px;bottom:24px;z-index:140;}
.cbot-launch{
  position:relative;width:60px;height:60px;border-radius:50%;border:none;cursor:pointer;
  font-size:26px;color:#fff;
  background:linear-gradient(135deg,var(--bot-accent),var(--bot-head));
  box-shadow:0 8px 22px rgba(0,0,0,.3);
  transition:transform .2s,box-shadow .2s;
}
.cbot-launch:hover{transform:scale(1.08);box-shadow:0 12px 28px rgba(0,0,0,.35);}
.cbot-launch-badge{
  position:absolute;top:-4px;right:-4px;
  background:#fff;color:var(--bot-head);
  font-size:9px;font-weight:900;border-radius:30px;padding:2px 5px;
  box-shadow:0 2px 6px rgba(0,0,0,.2);letter-spacing:.04em;
}
.cbot-panel{
  position:absolute;right:0;bottom:0;width:340px;max-width:90vw;height:500px;max-height:80vh;
  background:#fff;border-radius:16px;
  box-shadow:0 16px 48px rgba(0,0,0,.22);
  display:flex;flex-direction:column;overflow:hidden;
}
.cbot-panel[hidden]{display:none;}
.cbot-head{background:var(--bot-head);color:#fff;padding:12px 14px;display:flex;align-items:center;gap:8px;flex-shrink:0;}
.cbot-title{font-weight:700;font-size:15px;flex:1;}
.cbot-mode{display:flex;background:rgba(255,255,255,.15);border-radius:30px;padding:2px;gap:2px;}
.cbot-mode button{border:none;background:none;color:rgba(255,255,255,.75);font-size:11px;font-weight:700;padding:4px 9px;border-radius:30px;cursor:pointer;font-family:inherit;}
.cbot-mode button.on{background:#fff;color:var(--bot-head);}
.cbot-x{border:none;background:none;color:rgba(255,255,255,.8);font-size:22px;cursor:pointer;padding:0 4px;line-height:1;}
.cbot-log{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:#f7f8fb;}
.cbot-msg{max-width:85%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.65;word-break:break-word;}
.cbot-msg.bot{background:#fff;border:1px solid #e8ecf0;align-self:flex-start;border-bottom-left-radius:4px;}
.cbot-msg.user{background:var(--bot-accent);color:#fff;align-self:flex-end;border-bottom-right-radius:4px;}
/* タイピングインジケーター */
.cbot-typing{display:flex;align-items:center;gap:5px;padding:12px 16px;}
.cbot-typing span{
  width:7px;height:7px;border-radius:50%;background:var(--bot-accent);opacity:.4;
  animation:cbot-bounce .9s ease-in-out infinite;
}
.cbot-typing span:nth-child(2){animation-delay:.15s;}
.cbot-typing span:nth-child(3){animation-delay:.30s;}
@keyframes cbot-bounce{0%,60%,100%{transform:translateY(0);opacity:.4;}30%{transform:translateY(-5px);opacity:1;}}
.cbot-chips{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px 4px;background:#f7f8fb;flex-shrink:0;}
.cbot-chip{
  border:1.5px solid #dde1e7;background:#fff;border-radius:30px;
  padding:5px 12px;font-size:12px;font-weight:700;color:#555;cursor:pointer;
  font-family:inherit;transition:border-color .15s,color .15s;
}
.cbot-chip:hover{border-color:var(--bot-accent);color:var(--bot-accent);}
.cbot-input{display:flex;gap:8px;padding:10px 12px;border-top:1px solid #eee;flex-shrink:0;}
.cbot-input input{
  flex:1;border:1.5px solid #dde1e7;border-radius:30px;
  padding:9px 14px;font-size:14px;font-family:inherit;
  transition:border-color .2s;
}
.cbot-input input:focus{outline:none;border-color:var(--bot-accent);}
.cbot-input button{
  border:none;background:var(--bot-accent);color:#fff;border-radius:30px;
  padding:0 18px;font-weight:900;font-size:16px;cursor:pointer;font-family:inherit;
  transition:filter .2s;
}
.cbot-input button:hover{filter:brightness(1.1);}
