/* =============================================
   PRESHINE MEMBERS — style.css
   ============================================= */

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

/* ─ Variables ─ */
:root {
  --c-text:       #524646;
  --c-rose:       #C8808A;
  --c-gold:       #B8955A;
  --c-bg:         #fffaf8;
  --c-sidebar-bg: #f7f0eb;
  --c-border:     #e8d5ce;
  --c-active:     rgba(200,128,138,0.09);
  --c-done:       #82b082;
  --c-dark:       #2a1f1f;
  --header-h:     58px;
  --sidebar-w:    300px;
  --font-serif:   'Shippori Mincho', serif;
  --font-sans:    'Noto Sans JP', sans-serif;
  --font-en:      'Cormorant Garamond', serif;
  --font-label:   'Josefin Sans', sans-serif;
}

.sp-br { display: none; }
@media (max-width: 768px) { .sp-br { display: block; } }

/* ─ Scrollbar ─ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(215,139,154,0.35); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(215,139,154,0.6); }
* { scrollbar-width: thin; scrollbar-color: rgba(215,139,154,0.35) transparent; }

/* ─ Reset ─ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.75;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
}
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* =============================================
   HEADER
   ============================================= */
#pmFixedTop {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
}

.pm-gift-notice {
  background: #fdf8f5;
  border-bottom: 1px solid rgba(202,177,126,0.25);
  padding: 12px 24px;
  font-size: 0.75rem;
  line-height: 1.9;
  color: #7a6a6a;
  letter-spacing: 0.06em;
  text-align: center;
}
.pm-gift-notice strong {
  color: #B8955A;
  font-weight: 500;
  font-size: 0.875rem;
}

.pm-header {
  position: relative;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--c-border);
}

.pm-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  position: relative;
}

.pm-header__brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.pm-header__logo {
  height: 36px;
  width: auto;
  display: block;
}

.pm-header__course-name {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--c-text);
  letter-spacing: 0.06em;
}

.pm-sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(200,128,138,0.4);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--c-rose);
  font-family: var(--font-sans);
  line-height: 1.6;
  flex-shrink: 0;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

/* =============================================
   LAYOUT SHELL
   ============================================= */
.pm-layout {
  display: flex;
  min-height: 100vh;
}

/* =============================================
   SIDEBAR
   ============================================= */
.pm-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: #fdf5f2;
  border-right: 1px solid rgba(215,139,154,0.18);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(215,139,154,0.3) transparent;
}

.pm-sidebar::-webkit-scrollbar { width: 4px; }
.pm-sidebar::-webkit-scrollbar-thumb { background: rgba(215,139,154,0.3); border-radius: 4px; }

.pm-sidebar__inner { padding: 20px 0 40px; }

/* Sidebar heading */
.pm-sidebar__heading {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--c-gold);
  padding: 0 20px 14px;
  display: block;
  text-transform: uppercase;
}

/* Progress */
.pm-progress {
  padding: 0 20px 18px;
  border-bottom: 1px solid rgba(215,139,154,0.15);
  margin-bottom: 10px;
}

.pm-progress__bar-bg {
  height: 5px;
  background: rgba(215,139,154,0.15);
  border-radius: 10px;
  margin-bottom: 7px;
  overflow: hidden;
}

.pm-progress__bar {
  height: 5px;
  background: var(--c-rose);
  border-radius: 10px;
  width: 0%;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}

.pm-progress__text {
  font-size: 10px;
  color: var(--c-gold);
  opacity: 0.85;
  letter-spacing: 0.04em;
}

/* Chapter group */
.pm-chapter { margin-bottom: 6px; }

.pm-chapter__label {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--c-gold);
  opacity: 0.8;
  padding: 12px 20px 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.pm-chapter__label::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

/* Lesson item button */
.pm-lesson-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 9px 20px;
  background: none;
  border: none;
  text-align: left;
  transition: background 0.15s;
  position: relative;
}

.pm-lesson-btn:hover { background: rgba(200,128,138,0.06); }

.pm-lesson-btn.is-active {
  background: var(--c-active);
}

.pm-lesson-btn.is-active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--c-rose);
  border-radius: 0 3px 3px 0;
}

/* Check circle */
.pm-lesson-btn__check {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: transparent;
  margin-top: 2px;
  transition: all 0.2s;
  background: #fff;
}

.pm-lesson-btn.is-done .pm-lesson-btn__check {
  background: var(--c-rose);
  border-color: var(--c-rose);
  color: #fff;
}

.pm-lesson-btn.is-active .pm-lesson-btn__check {
  border-color: var(--c-rose);
}

/* Lesson text */
.pm-lesson-btn__body { flex: 1; min-width: 0; }

.pm-lesson-btn__title {
  font-size: 12px;
  line-height: 1.55;
  color: var(--c-text);
}

.pm-lesson-btn.is-active .pm-lesson-btn__title {
  color: var(--c-rose);
  font-weight: 500;
}

.pm-lesson-btn__meta {
  font-family: var(--font-label);
  font-size: 10px;
  color: var(--c-text);
  opacity: 0.45;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

/* ─ Locked chapter / lesson ─ */
.pm-chapter--locked .pm-chapter__label {
  opacity: 0.45;
}

.pm-lesson-btn--locked {
  opacity: 0.5;
  cursor: pointer;
}

.pm-lesson-btn--locked:hover {
  background: rgba(184,149,90,0.06);
  opacity: 0.7;
}

.pm-lesson-btn__lock {
  width: 17px;
  min-width: 17px;
  margin-top: 2px;
  font-size: 11px;
  text-align: center;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.pm-main {
  flex: 1;
  min-width: 0;
  background: #fff;
}

/* ─ Video ─ */
.pm-video-wrap {
  background: #180f0f;
  width: 100%;
}

/* ─ Locked screen ─ */
.pm-locked-screen {
  background: linear-gradient(160deg, #fdf8f5 0%, #f7ece8 100%);
  width: 100%;
  padding: 64px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

.pm-locked-screen__inner {
  max-width: 440px;
  text-align: center;
}

.pm-locked-screen__logo {
  width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 20px;
  mix-blend-mode: multiply;
}

.pm-locked-screen__eyebrow {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--c-gold);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.pm-locked-screen__rule {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
  margin: 14px auto;
}

.pm-locked-screen__title {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
  color: var(--c-dark);
  line-height: 1.85;
  letter-spacing: 0.08em;
  margin: 0;
}

.pm-locked-screen__title span {
  color: var(--c-rose);
}

.pm-locked-screen__desc {
  font-size: 12.5px;
  color: #7a6a6a;
  line-height: 2;
  margin: 4px 0 28px;
  letter-spacing: 0.04em;
  text-align: center;
}

.pm-locked-screen__btn {
  display: inline-block;
  padding: 13px 36px;
  background: linear-gradient(135deg, #d78b9a 0%, #C8808A 100%);
  color: #fff;
  font-size: 13px;
  font-family: var(--font-sans);
  letter-spacing: 0.12em;
  text-decoration: none;
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(200,128,138,0.28);
  transition: all 0.25s;
}

.pm-locked-screen__btn:hover {
  background: linear-gradient(135deg, #c87a8a 0%, #b86e78 100%);
  box-shadow: 0 6px 20px rgba(200,128,138,0.38);
  transform: translateY(-1px);
}

.pm-locked-screen__sub {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 28px;
  border: 1px solid rgba(200,128,138,0.5);
  border-radius: 100px;
  font-size: 12px;
  color: var(--c-rose);
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.25s;
}

.pm-locked-screen__sub:hover {
  background: rgba(200,128,138,0.07);
  border-color: var(--c-rose);
}

.pm-video-ratio {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.pm-video-ratio iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Empty state (no vimeoId) */
.pm-video-empty {
  aspect-ratio: 16 / 9;
  background: #1e1212;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,0.4);
}

.pm-video-empty__icon { font-size: 36px; opacity: 0.5; }

.pm-video-empty__text {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* ─ Lesson info ─ */
.pm-lesson-info {
  padding: 28px 40px 12px;
  max-width: 800px;
}

.pm-lesson-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pm-tag {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 3px 10px;
  border-radius: 100px;
}

.pm-tag--chapter {
  background: rgba(184,149,90,0.13);
  color: var(--c-gold);
}

.pm-tag--num {
  color: var(--c-text);
  opacity: 0.4;
  padding-left: 0;
}

.pm-lesson-info__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.pm-lesson-info__desc {
  font-size: 13px;
  line-height: 1.95;
  color: var(--c-text);
  opacity: 0.78;
  white-space: pre-line;
}

/* ─ Lesson navigation ─ */
.pm-lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  max-width: 800px;
  margin-top: 8px;
}

.pm-lesson-nav__btn {
  font-size: 12px;
  color: var(--c-text);
  background: none;
  border: 1px solid var(--c-border);
  padding: 8px 18px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  transition: all 0.18s;
}

.pm-lesson-nav__btn:hover:not(:disabled) {
  border-color: var(--c-rose);
  color: var(--c-rose);
}

.pm-lesson-nav__btn:disabled {
  opacity: 0.25;
  cursor: default;
}

/* ─ Complete button ─ */
.pm-complete-wrap {
  padding: 4px 40px 48px;
  max-width: 800px;
}

.pm-complete-btn {
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 9px 22px;
  border-radius: 100px;
  border: 1.5px solid var(--c-rose);
  color: var(--c-rose);
  background: none;
  transition: all 0.2s;
}

.pm-complete-btn:hover { background: var(--c-rose); color: #fff; }

.pm-complete-btn.is-done {
  background: var(--c-done);
  border-color: var(--c-done);
  color: #fff;
}

/* ─ Footer salon CTA ─ */
.pm-footer-salon {
  text-align: center;
  padding: 40px 20px 32px;
  background: #fdf0ef;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.pm-footer-salon__logo {
  width: 90px;
  height: auto;
  mix-blend-mode: multiply;
}


/* ─ Footer note ─ */
.pm-footer-note {
  text-align: center;
  padding: 24px 20px;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--c-text);
  opacity: 0.35;
}

/* =============================================
   MOBILE
   ============================================= */
@media (max-width: 768px) {
  .pm-sidebar-toggle { display: flex; align-items: center; gap: 5px; }

  .pm-gift-notice strong { font-size: 15px; }
  .pm-gift-notice { font-size: 11px; }

  .pm-layout { flex-direction: column; min-height: unset; }

  .pm-sidebar {
    width: 100%;
    min-width: 100%;
    position: static;
    height: 0;
    max-height: 0;
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    transition: max-height 0.3s ease;
  }

  .pm-sidebar.is-open {
    height: auto;
    max-height: 60vh;
    overflow-y: auto;
  }

  .pm-lesson-info {
    padding: 20px 20px 10px;
  }

  .pm-lesson-info__title {
    font-size: 18px;
  }

  .pm-lesson-nav {
    padding: 14px 20px;
    gap: 10px;
  }

  .pm-complete-wrap {
    padding: 4px 20px 36px;
  }

  .pm-header__divider,
  .pm-header__course-name { display: none; }
}

/* ─ Worksheet ─ */
.pm-worksheet-wrap {
  padding: 0 36px 24px;
}

.pm-worksheet {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fffaf8;
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-gold);
  border-radius: 6px;
  padding: 16px 20px;
}

.pm-worksheet__icon {
  font-size: 24px;
  flex-shrink: 0;
  opacity: 0.75;
}

.pm-worksheet__body {
  flex: 1;
}

.pm-worksheet__label {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 3px;
}

.pm-worksheet__desc {
  font-size: 11.5px;
  color: #9a8880;
  line-height: 1.6;
}

.pm-worksheet__actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}

.pm-worksheet__btn {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 9px 16px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s;
}

.pm-worksheet__btn--open {
  background: transparent;
  color: var(--c-gold);
  border: 1px solid var(--c-gold);
}

.pm-worksheet__btn--print {
  background: var(--c-gold);
  color: #fff;
  border: none;
}

.pm-worksheet__btn:hover {
  opacity: 0.75;
}

@media (max-width: 768px) {
  .pm-worksheet-wrap {
    padding: 0 20px 20px;
  }

  .pm-worksheet {
    flex-wrap: wrap;
    gap: 12px;
  }

  .pm-worksheet__actions {
    width: 100%;
  }

  .pm-worksheet__btn {
    flex: 1;
    text-align: center;
  }
}
