/*
  手本：なっちゃんの「魔法セールス講座 第3期」告知画像
  ピンクのキラキラ背景 ／ 濃いピンクのリボンと丸メダル ／ 金のふち・金の文字
  画像は使わず、色とキラキラはCSSだけで再現（試作）
*/
:root {
  --rose: #e4306f;
  --rose-deep: #c8145a;
  --wine: #7a1038;
  --text: #5a1a35;
  --muted: #8a5a6c;
  --gold: #a8741a;
  --gold-light: #e8c06a;
  --gold-line: #dcb265;
  --card: rgba(255, 255, 255, .86);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  font-weight: 500;
  color: var(--text);
  line-height: 1.75;
  background: #fff3f6;
  -webkit-font-smoothing: antialiased;
}
/* ページ全体の背景（Codexの画像生成。スマホでも固定されるよう別の層） */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #fff3f6 url("img/page.jpg") center / cover no-repeat; }
a { color: var(--rose-deep); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, .heading, .lec-title, .detail-title, .next-title, .medal { font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; }
.wrap { width: min(820px, 100% - 28px); margin-inline: auto; }

/* 上のバー */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: rgba(255,255,255,.78); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(220,178,101,.5); font-size: .85rem; }
.nav-link { white-space: nowrap; margin-right: auto; margin-left: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.nav-link:hover { color: var(--rose-deep); }
.brand { white-space: nowrap; font-weight: 700; color: var(--wine); text-decoration: none; letter-spacing: .06em; }
.me { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.me-icon { width: 24px; height: 24px; object-fit: contain; }
.logout { white-space: nowrap; margin-left: 6px; font-size: .78rem; color: var(--muted); }

/* ヒーロー */
.hero { padding: 40px 16px 34px; text-align: center; background: url("img/hero.jpg") center top / cover no-repeat; -webkit-mask-image: linear-gradient(#000 85%, transparent); mask-image: linear-gradient(#000 85%, transparent); }
.hero-catch { display: inline-block; margin: 0 0 12px; padding: 4px 16px; border: 1.5px solid #f49ab9; border-radius: 999px; background: rgba(255,255,255,.8); font-size: .9rem; font-weight: 700; color: var(--rose-deep); }
.ribbon { margin: 0 auto 8px; }
.ribbon span { position: relative; display: inline-block; padding: 6px 34px; background: linear-gradient(180deg, #ff5a92, var(--rose-deep)); color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: .14em; box-shadow: 0 6px 14px rgba(200,20,90,.25); clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%); }
h1 { margin: 4px 0 6px; font-size: clamp(2.1rem, 7vw, 3.4rem); font-weight: 900; line-height: 1.3; color: var(--rose-deep); text-shadow: 0 2px 0 #fff, 0 0 18px rgba(255,255,255,.9); letter-spacing: .02em; }
.h1-magic { background: linear-gradient(180deg, #f6d27c 0%, #b9801f 55%, #e6b552 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 0 #fff); font-size: 1.15em; }
.term { display: inline-grid; place-items: center; width: 3.1em; height: 3.1em; white-space: nowrap; margin-left: .3em; vertical-align: middle; border: 2px solid var(--gold-line); border-radius: 50%; background: #fff; color: var(--gold); font-size: .36em; font-weight: 800; text-shadow: none; box-shadow: 0 4px 12px rgba(168,116,26,.2); }
.lead { display: inline-block; margin: 10px 0 0; padding: 6px 22px; border-top: 1.5px solid var(--gold-line); border-bottom: 1.5px solid var(--gold-line); background: linear-gradient(90deg, transparent, rgba(255,244,214,.95) 15%, rgba(255,244,214,.95) 85%, transparent); font-weight: 700; color: var(--wine); }

/* 受講のようす・次の講義 */
.status { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0 8px; }
.progress-card, .next-card { padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid rgba(220,178,101,.6); box-shadow: 0 10px 26px rgba(200,20,90,.1); }
.next-card { display: block; text-decoration: none; color: inherit; background: linear-gradient(135deg, #fff, #ffe6ef); }
.next-card:hover { box-shadow: 0 12px 30px rgba(200,20,90,.18); }
.card-label { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--gold); }
.progress-num { margin: 0 0 8px; font-size: .95rem; }
.progress-num b { font-size: 1.6rem; color: var(--rose-deep); }
.bar { height: 10px; border-radius: 999px; background: #ffe0ea; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff8fb5, var(--rose-deep)); transition: width .4s; }
.next-date { margin: 0; font-weight: 700; color: var(--rose-deep); }
.next-title { margin: 2px 0 0; font-size: 1.1rem; font-weight: 800; color: var(--wine); }

/* Zoom */
.zoom-card { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; background: var(--card); border: 1px solid rgba(220,178,101,.6); box-shadow: 0 10px 26px rgba(200,20,90,.1); }
.zoom-card.is-compact { margin-top: 14px; box-shadow: none; }
.zoom-ids { margin: 0; font-size: .9rem; }
.zoom-ids b { color: var(--wine); letter-spacing: .04em; }
.zoom-ids span { margin-left: 14px; }
.zoom-btn { padding: 10px 22px; border-radius: 999px; background: linear-gradient(180deg, #ff5a92, var(--rose-deep)); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 14px rgba(200,20,90,.25); }
.zoom-btn:hover { filter: brightness(1.05); }
.zoom-btn.is-off { background: #e9c7d3; box-shadow: none; cursor: default; }

/* 見出し */
.heading { display: flex; align-items: center; gap: 14px; margin: 30px 0 18px; font-size: 1.3rem; font-weight: 800; white-space: nowrap; color: var(--rose-deep); }
.heading::before, .heading::after { content: ""; flex: 1; height: 1.5px; background: linear-gradient(90deg, transparent, var(--gold-line)); }
.heading::after { transform: scaleX(-1); }
.heading span { display: flex; align-items: center; gap: 12px; letter-spacing: .16em; }


/* 講義の一覧 */
.lectures { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lec { display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--gold-line); box-shadow: 0 8px 22px rgba(200,20,90,.09); text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.lec:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(200,20,90,.17); }
.lec-today { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(228,48,111,.18), 0 10px 26px rgba(200,20,90,.16); }
.medal { position: relative; display: grid; place-items: center; width: 74px; height: 74px; color: #fff; font-size: 1.45rem; font-weight: 900; line-height: 1; }
.medal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(160,20,70,.25)); }
.medal-num { position: relative; margin-top: 21%; text-shadow: 0 1px 2px rgba(122,16,56,.6); }
.medal small { font-size: .5em; }
.lec-date { display: grid; grid-template-columns: auto auto; align-items: center; justify-content: center; column-gap: 6px; min-width: 136px; padding-right: 16px; border-right: 1px solid rgba(220,178,101,.6); text-align: center; }
.lec-date b { font-family: "Noto Serif JP", serif; font-size: 1.55rem; font-weight: 900; line-height: 1.2; color: var(--rose-deep); }
.lec-date b small { font-size: .62em; }
.lec-date i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--rose-deep); color: #fff; font-style: normal; font-size: .78rem; font-weight: 700; }
.lec-time { grid-column: 1 / -1; font-weight: 700; font-size: .95rem; background: linear-gradient(transparent 62%, #fff1a6 62%); }
.lec-body { display: grid; gap: 2px; min-width: 0; }
.lec-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; }
.day-tag img { height: 1.1em; width: auto; margin: 0 4px 0 -4px; }
.day-tag { display: inline-flex; align-items: center; white-space: nowrap; padding: 1px 10px; background: linear-gradient(180deg, #ff6b9b, var(--rose-deep)); color: #fff; letter-spacing: .06em; clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%); padding-right: 14px; }
.new-tag { padding: 1px 8px; border-radius: 4px; background: var(--rose-deep); color: #fff; }
.state { padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.state-today { color: #fff; background: var(--rose); border-color: var(--rose); }
.state-archive { color: #1f8a5b; }
.state-prep { color: var(--gold); }
.state-soon { color: var(--muted); }
.done-tag { color: #1f8a5b; }
.lec-title { font-size: 1.28rem; font-weight: 800; color: var(--rose-deep); line-height: 1.45; }
.lec-sub { font-size: .86rem; color: var(--text); }
.arrow { font-size: 1.8rem; color: var(--gold-line); }
.lec-icon { width: 64px; height: 64px; object-fit: contain; }
.detail-icon { float: right; width: 92px; height: 92px; object-fit: contain; margin: -6px 0 0 10px; }

.banner { margin: 22px 0 0; padding: 10px 16px; border-radius: 12px; background: linear-gradient(90deg, #ff5a92, var(--rose-deep)); color: #fff; text-align: center; font-weight: 700; letter-spacing: .06em; box-shadow: 0 8px 18px rgba(200,20,90,.22); }

/* 過去の期のアーカイブ */
.past-link { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 14px 0 0; padding: 14px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--gold-line); font-weight: 700; color: var(--wine); text-decoration: none; }
.past-link:hover { box-shadow: 0 10px 24px rgba(200,20,90,.14); }
.term-tabs { display: flex; justify-content: center; gap: 10px; margin: -4px 0 8px; }
.term-tabs a { padding: 6px 20px; border-radius: 999px; border: 1.5px solid var(--gold-line); background: #fff; font-weight: 700; text-decoration: none; color: var(--rose-deep); }
.term-block { margin-top: 26px; }
.term-title { margin: 0 0 12px; padding-left: 12px; border-left: 4px solid var(--rose-deep); font-family: "Noto Serif JP", serif; font-size: 1.2rem; font-weight: 800; color: var(--wine); }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.video-card { padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid rgba(220,178,101,.6); box-shadow: 0 8px 20px rgba(200,20,90,.08); }
.video-card h4 { margin: 8px 2px 0; font-size: .95rem; font-weight: 700; color: var(--wine); line-height: 1.5; }
.playlist-card { padding: 18px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--gold-line); box-shadow: 0 12px 28px rgba(200,20,90,.1); }
.playlist-help { margin: 10px 2px 0; font-size: .84rem; color: var(--muted); }

/* 講義ページ */
.back { display: inline-block; margin: 22px 0 10px; font-weight: 700; text-decoration: none; }
.detail { padding: 22px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--gold-line); box-shadow: 0 12px 30px rgba(200,20,90,.12); }
.detail-meta { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .86rem; font-weight: 700; color: var(--gold); }
.detail-title { margin: 6px 0 0; font-size: 1.7rem; font-weight: 900; color: var(--rose-deep); line-height: 1.4; }
.detail-sub { margin: 2px 0 16px; color: var(--text); }
.player { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg, #ffc4d8, #ffe8f0 55%, #fff4dc); border: 1px solid rgba(220,178,101,.5); }
.player iframe { display: block; width: 100%; height: 100%; border: 0; }
.player-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; margin: 0; text-align: center; font-weight: 700; color: var(--wine); line-height: 1.6; }
.player-empty::before { content: ""; width: 44px; height: 44px; margin-bottom: 6px; background: url("img/heart.png") center / contain no-repeat; }
.player-empty small { font-weight: 500; color: var(--muted); }
.detail-actions { margin: 14px 0 0; text-align: right; }
.watch-btn { padding: 9px 20px; border: 1.5px solid var(--rose-deep); border-radius: 999px; background: #fff; color: var(--rose-deep); font: inherit; font-weight: 700; cursor: pointer; }
.watch-btn.is-done { background: #1f8a5b; border-color: #1f8a5b; color: #fff; }
.materials { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--gold-line); }
.materials h3 { margin: 0 0 6px; font-size: .95rem; color: var(--gold); letter-spacing: .08em; }
.materials ul { margin: 0; padding-left: 1.2em; }
.muted { margin: 0; font-size: .88rem; color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 0; font-size: .88rem; font-weight: 700; }
.pager a { text-decoration: none; }

footer { padding: 34px 18px 44px; text-align: center; }
.closing { margin: 0 0 14px; font-family: "Noto Serif JP", serif; font-weight: 800; font-size: 1.1rem; color: var(--wine); line-height: 1.9; }
.note { margin: 0; font-size: .74rem; color: var(--muted); }

/* ログイン画面（試作） */
.login-page { display: grid; min-height: 100vh; place-items: center; }
.login { width: min(440px, 100% - 28px); padding: 30px 0; text-align: center; }
.login h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
.login-lead { margin: 4px 0 18px; font-weight: 700; color: var(--wine); }
.login-card { display: grid; gap: 10px; padding: 24px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--gold-line); box-shadow: 0 14px 34px rgba(200,20,90,.14); text-align: left; }
.login-card label { font-size: .86rem; font-weight: 700; color: var(--wine); }
.login-card input { padding: 12px 14px; border: 1.5px solid #f3b3c9; border-radius: 12px; font: inherit; font-size: 1rem; }
.login-card input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(228,48,111,.15); }
.login-card button { margin-top: 4px; padding: 13px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #ff5a92, var(--rose-deep)); color: #fff; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 8px 18px rgba(200,20,90,.25); }
.login-help { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }
.proto-note { margin: 14px 0 0; font-size: .74rem; color: var(--muted); }

@media (max-width: 640px) {
  .status { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .topbar { padding: 10px 12px; gap: 8px; font-size: .78rem; }
  .nav-link { font-size: .72rem; margin-left: 0; }
  .me-icon { display: none; }
  .detail-meta { flex-wrap: wrap; row-gap: 2px; }
  .me #me-name { display: none; }
  .zoom-ids span { display: block; margin-left: 0; }
  .zoom-btn { width: 100%; text-align: center; }
  .lead { padding: 6px 10px; font-size: .86rem; word-break: keep-all; }
  .lec { grid-template-columns: auto 1fr auto; gap: 10px 12px; padding: 12px; }
  .lec-date { min-width: 0; grid-row: 1; grid-column: 2; justify-self: start; border-right: 0; padding-right: 0; display: flex; gap: 6px; align-items: center; }
  .lec-time { background: none; font-size: .85rem; }
  .lec-date b { font-size: 1.25rem; }
  .medal { width: 60px; height: 60px; font-size: 1.2rem; grid-row: 1 / 3; }
  .lec-icon { display: none; }
  .detail-icon { width: 64px; height: 64px; }
  .lec-body { grid-column: 2 / 4; grid-row: 2; }
  .arrow { grid-row: 1; grid-column: 3; }
  .lec-title { font-size: 1.12rem; }
  .detail { padding: 16px; }
  .detail-title { font-size: 1.35rem; }
}
