/* merike.ee course player */
.mvm-shell { --wine: #8f070e; --wine-2: #b3262d; --ink: #1f1b18; --muted: #6b6159; --line: #e8d9cc; --paper: #fffaf3; --panel: #fff6ec; --ok: #1f8a4c; --stage: #14110f; --r: 12px;
  padding: 18px 22px 30px; color: var(--ink); }
.mvm-shell *, .mvm-shell *::before, .mvm-shell *::after { box-sizing: border-box; }
.mvm-app { min-height: 60vh; }

/* skeleton while loading */
.mvm-skeleton { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.mvm-skel-video, .mvm-skel-side span, .mvm-video-skel { border-radius: var(--r); background: linear-gradient(90deg, #efe5db 0, #f8f1ea 50%, #efe5db 100%); background-size: 200% 100%; animation: mvm-shimmer 1.3s infinite linear; }
.mvm-skel-video, .mvm-video-skel { aspect-ratio: 16/9; }
.mvm-skel-side { display: grid; gap: 10px; align-content: start; }
.mvm-skel-side span { height: 54px; }
@keyframes mvm-shimmer { to { background-position: -200% 0; } }

/* top bar */
.mvm-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.mvm-topbar h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); color: var(--wine); line-height: 1.1; }
.mvm-prog-text { color: var(--muted); font-size: 14px; }
.mvm-topbar__right { display: flex; align-items: center; gap: 14px; }
.mvm-ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ok) calc(var(--p) * 1%), #eadfd5 0); transition: --p .6s; position: relative; }
.mvm-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.mvm-ring span { position: relative; font-size: 12px; font-weight: 700; }
.mvm-ring.is-pop { animation: mvm-pop .6s ease; }
@keyframes mvm-pop { 40% { transform: scale(1.18); } }

/* layout */
.mvm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.mvm-main { min-width: 0; }
.mvm-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; box-shadow: 0 10px 30px rgba(80, 30, 10, .06); }
.mvm-side__head { display: grid; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.mvm-search { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.mvm-search:focus { outline: 2px solid rgba(143, 7, 14, .25); border-color: var(--wine); }
.mvm-curriculum { overflow-y: auto; padding-bottom: 8px; }

/* stage / video */
.mvm-stage { position: relative; }
.mvm-frame { position: relative; border-radius: var(--r); overflow: hidden; background: var(--stage); aspect-ratio: 16/9; box-shadow: 0 18px 40px rgba(20, 10, 5, .25); transition: opacity .35s ease, transform .35s ease; }
.mvm-frame.is-entering { opacity: 0; transform: scale(.985); }
.mvm-video { display: block; width: 100%; height: 100%; background: #000; }
.mvm-bigplay { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%; background: rgba(143, 7, 14, .9); cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .2s, opacity .25s; }
.mvm-bigplay span { display: block; width: 0; height: 0; margin-left: 32px; border-style: solid; border-width: 15px 0 15px 26px; border-color: transparent transparent transparent #fff; }
.mvm-bigplay:hover { transform: scale(1.08); }
.mvm-bigplay.is-hidden { opacity: 0; pointer-events: none; transform: scale(.8); }
.mvm-frame--locked { background: #2a2320 center/cover no-repeat; }
.mvm-locked-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; text-align: center; padding: 20px; background: linear-gradient(180deg, rgba(20, 10, 5, .55), rgba(20, 10, 5, .85)); backdrop-filter: blur(3px); }
.mvm-locked-overlay h3 { margin: 0; color: #fff; font-size: 22px; }
.mvm-lock-big { font-size: 44px; animation: mvm-float 2.4s ease-in-out infinite; }
@keyframes mvm-float { 50% { transform: translateY(-6px); } }
.mvm-upnext { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 6, 4, .82); animation: mvm-fade .3s ease; }
.mvm-upnext__box { text-align: center; color: #fff; padding: 20px; }
.mvm-upnext__box small { opacity: .75; text-transform: uppercase; letter-spacing: .08em; }
.mvm-upnext__box h3 { color: #fff; margin: 6px 0 14px; }
.mvm-upnext__count { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--wine-2); font-size: 24px; animation: mvm-pulse 1s infinite; }
.mvm-upnext__actions { display: flex; gap: 10px; justify-content: center; }
@keyframes mvm-pulse { 50% { box-shadow: 0 0 0 10px rgba(179, 38, 45, .2); } }
@keyframes mvm-fade { from { opacity: 0; } }

/* toolbar */
.mvm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 2px 6px; }
.mvm-toolbar__left { min-width: 0; }
.mvm-lesson-title { margin: 0; font-size: 22px; line-height: 1.2; color: var(--ink); }
.mvm-toolbar__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mvm-speed-wrap { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.mvm-speed { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; }

/* buttons */
.mvm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 16px; border: 1px solid var(--wine); border-radius: 8px; background: var(--wine); color: #fff !important; font: inherit; font-weight: 700; font-size: 14px; line-height: 1; text-decoration: none !important; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; }
.mvm-btn:hover { background: var(--wine-2); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(143, 7, 14, .2); }
.mvm-btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.mvm-btn--ghost { background: #fff; color: var(--wine) !important; }
.mvm-btn--ghost:hover { background: var(--paper); }
.mvm-btn--done { background: var(--ok); border-color: var(--ok); }
.mvm-btn--done:hover { background: #18723f; }
.mvm-link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.mvm-link:hover { color: var(--wine); text-decoration: underline; }
.mvm-link--danger:hover { color: #b32d2e; }
.mvm-row, .mvm-row-end { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mvm-row-end { justify-content: flex-end; }
.mvm-muted { color: var(--muted); }

/* tabs */
.mvm-tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.mvm-tab { position: relative; padding: 12px 14px; border: 0; background: none; font: inherit; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; white-space: nowrap; transition: color .2s; }
.mvm-tab:hover, .mvm-tab.is-active { color: var(--ink); }
.mvm-tab-ink { position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; border-radius: 3px 3px 0 0; background: var(--wine); transition: transform .3s cubic-bezier(.4, 0, .2, 1), width .3s cubic-bezier(.4, 0, .2, 1); }
.mvm-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: var(--wine); color: #fff; font-size: 11px; animation: mvm-pop .5s ease; }
.mvm-panel { padding: 18px 2px; }
.mvm-panel__inner { transition: opacity .25s ease, transform .25s ease; }
.mvm-panel__inner.is-entering { opacity: 0; transform: translateY(6px); }
.mvm-material { font-size: 17px; line-height: 1.65; }
.mvm-material img { max-width: 100%; height: auto; border-radius: 8px; }
.mvm-shortcuts { margin-top: 24px; font-size: 12px; color: var(--muted); }

/* curriculum */
.mvm-sec-wrap { border-bottom: 1px solid var(--line); }
.mvm-sec { display: grid; grid-template-columns: 1fr auto 16px; gap: 6px; align-items: center; width: 100%; padding: 12px 14px; border: 0; background: #fbf6f0; text-align: left; font: inherit; cursor: pointer; }
.mvm-sec__name { font-weight: 700; font-size: 15px; }
.mvm-sec__meta { font-size: 12px; color: var(--muted); }
.mvm-sec__chev { transition: transform .25s; color: var(--muted); }
.mvm-sec.is-collapsed .mvm-sec__chev { transform: rotate(-90deg); }
.mvm-sec-wrap.is-collapsed .mvm-lessons { display: none; }
.mvm-lessons { list-style: none; margin: 0; padding: 0; }
.mvm-lesson { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 14px; cursor: pointer; border-left: 3px solid transparent; transition: background .15s, border-color .15s; }
.mvm-lesson:hover { background: var(--paper); }
.mvm-lesson.is-active { background: #fdeee6; border-left-color: var(--wine); }
.mvm-lesson.is-locked .mvm-lesson__title { color: var(--muted); }
.mvm-lesson__body { display: grid; gap: 3px; min-width: 0; }
.mvm-lesson__title { font-size: 14px; line-height: 1.35; }
.mvm-lesson__meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.mvm-price-tag { padding: 0 6px; border-radius: 4px; background: #fff0d9; color: #8a5a00; font-weight: 700; }
.mvm-check { width: 22px; height: 22px; margin-top: 1px; border: 2px solid #cdbcaf; border-radius: 6px; background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; transition: background .2s, border-color .2s, transform .2s; }
.mvm-check span { color: #fff; font-size: 13px; line-height: 1; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.mvm-check.is-done { background: var(--ok); border-color: var(--ok); }
.mvm-check.is-done span { opacity: 1; transform: scale(1); }
.mvm-check:disabled { opacity: .4; cursor: default; }

/* notes */
.mvm-add-note { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 16px; border: 1px dashed #d9bfae; border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; transition: border-color .2s, background .2s; }
.mvm-add-note:hover { border-color: var(--wine); background: #fdf0ea; }
.mvm-note-editor, .mvm-composer { display: grid; gap: 8px; margin: 12px 0; animation: mvm-fade .25s ease; }
.mvm-textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; resize: vertical; background: #fff; transition: border-color .15s, box-shadow .15s; }
.mvm-textarea:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(143, 7, 14, .1); }
.mvm-time-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 0; border-radius: 99px; background: #2a2320; color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; justify-self: start; transition: background .15s; }
.mvm-time-chip:hover { background: var(--wine); }
.mvm-notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.mvm-note { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: opacity .25s, transform .25s; animation: mvm-slide .3s ease; }
.mvm-note.is-leaving, .mvm-comment.is-leaving { opacity: 0; transform: translateX(14px); }
.mvm-note__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mvm-note__actions { margin-left: auto; display: flex; gap: 12px; }
.mvm-note__body { margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; }
.mvm-notes-lesson { margin: 22px 0 0; font-size: 17px; color: var(--wine); }
@keyframes mvm-slide { from { opacity: 0; transform: translateY(6px); } }

/* comments */
.mvm-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mvm-live__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: mvm-live 1.8s infinite; }
@keyframes mvm-live { 0% { box-shadow: 0 0 0 0 rgba(31, 138, 76, .5); } 70% { box-shadow: 0 0 0 8px rgba(31, 138, 76, 0); } }
.mvm-attach-time { font-size: 13px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; margin-right: auto; }
.mvm-comments, .mvm-replies { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.mvm-replies { margin-top: 12px; padding-left: 4px; border-left: 2px solid var(--line); padding-left: 12px; }
.mvm-comment { display: grid; grid-template-columns: 40px 1fr; gap: 12px; transition: opacity .25s, transform .25s; }
.mvm-comment.is-new { animation: mvm-new 1.6s ease; }
@keyframes mvm-new { 0% { opacity: 0; transform: translateY(-8px); background: #fdebd9; } 30% { opacity: 1; transform: none; } 100% { background: transparent; } }
.mvm-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.mvm-avatar.is-teacher { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--wine); }
.mvm-replies .mvm-comment { grid-template-columns: 32px 1fr; }
.mvm-replies .mvm-avatar { width: 32px; height: 32px; font-size: 12px; }
.mvm-comment__main { min-width: 0; }
.mvm-comment__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.mvm-comment__head time { color: var(--muted); font-size: 12px; }
.mvm-teacher { padding: 1px 8px; border-radius: 99px; background: var(--wine); color: #fff; font-size: 11px; font-weight: 700; }
.mvm-comment.by-teacher > .mvm-comment__main > .mvm-comment__body { background: #fff6ec; border-color: #f0d5c0; }
.mvm-comment__body { margin: 6px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 0 12px 12px 12px; background: #fff; white-space: pre-wrap; word-break: break-word; }
.mvm-comment__actions { display: flex; gap: 14px; }

/* paywall */
.mvm-paywall { max-width: 720px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, #fff, var(--panel)); box-shadow: 0 14px 40px rgba(80, 30, 10, .08); animation: mvm-slide .35s ease; }
.mvm-paywall h3 { margin: 0 0 6px; font-size: 24px; color: var(--wine); }
.mvm-price { font-size: 22px; font-weight: 800; color: var(--wine); }
.mvm-pay-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 12px 0; }
.mvm-pay-form { margin: 0; }
.mvm-pay-btn { display: grid; gap: 6px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; font: inherit; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.mvm-pay-btn:hover { border-color: var(--wine); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(143, 7, 14, .12); }
.mvm-pay-btn__title { font-weight: 800; font-size: 16px; color: var(--ink); }
.mvm-pay-btn__methods { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.mvm-brand { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 5px; background: #f1ece7; color: #3b322d; }
.mvm-brand--visa { background: #1a1f71; color: #fff; letter-spacing: .04em; }
.mvm-brand--mc { background: #fff3e6; color: #c25e00; }
.mvm-pay-btn--paypal .mvm-pay-btn__title { color: #003087; }
.mvm-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; color: var(--muted); font-size: 13px; }
.mvm-divider::before, .mvm-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mvm-secure { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* notices & toasts */
.mvm-notice { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 14px; border-radius: 10px; background: #f3efe8; animation: mvm-slide .3s ease; }
.mvm-notice.is-ok { background: #e6f5ec; }
.mvm-notice.is-bad { background: #fbe4e2; }
.mvm-x { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.mvm-toast { position: fixed; left: 50%; bottom: 26px; z-index: 99999; max-width: 90vw; padding: 11px 18px; border-radius: 12px; background: #1f1b18; color: #fff; font-size: 14px; box-shadow: 0 14px 36px rgba(0, 0, 0, .3); opacity: 0; transform: translate(-50%, 14px); transition: opacity .3s, transform .3s; }
.mvm-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.mvm-toast.is-bad { background: #a12a2a; }
.mvm-toast.is-ok { background: var(--ok); }
.mvm-empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }

@media (max-width: 980px) {
  .mvm-layout, .mvm-skeleton { grid-template-columns: 1fr; }
  .mvm-side { position: static; max-height: none; }
  .mvm-curriculum { max-height: 60vh; }
}
@media (max-width: 560px) {
  .mvm-shell { padding: 12px 10px 24px; }
  .mvm-frame { border-radius: 0; margin: 0 -10px; }
  .mvm-lesson-title { font-size: 18px; }
  .mvm-toolbar__right .mvm-btn--ghost:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mvm-shell *, .mvm-toast { animation: none !important; transition: none !important; }
}
.mvm-shell [hidden] { display: none !important; }
