/* Mihaly Csikszentmihalyi lesson. All rules scoped under .mch-* */
.mch-sc { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mch-pic { position: relative; width: 100%; max-width: 340px; }
.mch-pic img { display: block; width: 100%; max-height: 300px; object-fit: contain; filter: drop-shadow(0 12px 22px rgba(123,92,253,.3)); }
.mch-pic.mch-small img { max-height: 200px; }

/* the name */
.mch-name { display: flex; justify-content: center; gap: 4px; width: 100%; max-width: 380px; }
.mch-piece { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 92px; padding: 12px 4px 10px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--raised); color: var(--text); cursor: pointer; transition: border-color .3s, background .3s; }
.mch-lt { display: flex; font: 800 clamp(19px, 6.4vw, 30px) var(--sans); letter-spacing: .01em; }
.mch-l { font-style: normal; animation: mchIn .4s cubic-bezier(.2,.9,.3,1.3) var(--d) both; }
@keyframes mchIn { from { transform: translateY(-26px) rotate(-12deg); opacity: 0; } }
.mch-said { font: 800 18px var(--sans); color: var(--gold); opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
.mch-piece.on { border-color: var(--gold); background: rgba(252,192,80,.1); cursor: default; }
.mch-piece.on .mch-said { opacity: 1; transform: none; }
.mch-piece.on .mch-hu { color: var(--gold); }
.mch-name.done .mch-piece { animation: mchPop .5s ease-out both; }
.mch-name.done .mch-piece:nth-child(2) { animation-delay: .08s; }
.mch-name.done .mch-piece:nth-child(3) { animation-delay: .16s; }
.mch-name.done .mch-piece:nth-child(4) { animation-delay: .24s; }
@keyframes mchPop { 50% { transform: translateY(-8px); } }

/* Zurich: the speaker at the podium is the hit area */
.mch-hot { position: absolute; left: 14%; top: 2%; width: 32%; height: 48%; min-width: 44px; min-height: 44px; border: 0; border-radius: 16px; background: transparent; cursor: pointer; }
.mch-tag { position: absolute; left: 6%; top: 4%; padding: 6px 12px; border-radius: 12px; background: var(--gold); color: #1a1530; font: 800 16px var(--sans); opacity: 0; transform: translateY(8px) scale(.8); transition: opacity .35s, transform .35s cubic-bezier(.2,.9,.3,1.4); pointer-events: none; }
.mch-tag.on { opacity: 1; transform: none; }

/* the pager */
.mch-pager { cursor: pointer; transition: max-width .5s ease; }
.mch-pager.buzz img { animation: mchBuzz .09s linear 6 alternate; }
.mch-pager.mch-shrink { max-width: 150px; }
@keyframes mchBuzz { from { transform: translateX(-4px) rotate(-2deg); } to { transform: translateX(4px) rotate(2deg); } }
.mch-slot { width: 100%; display: flex; justify-content: center; }
.mch-beep { width: 100%; max-width: 330px; padding: 14px 16px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line-strong); text-align: left; animation: mchCard .45s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes mchCard { from { transform: translateY(24px) scale(.94); opacity: 0; } }
.mch-when { font: 700 13px var(--sans); color: var(--dim); }
.mch-what { font: 800 18px var(--sans); color: var(--text); margin: 2px 0 10px; }
.mch-m { display: grid; grid-template-columns: 112px 1fr 38px; align-items: center; gap: 8px; margin-top: 6px; font: 600 13px var(--sans); color: var(--dim); }
.mch-m b { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--gold) calc(var(--v) * 100%), var(--line) 0); }
.mch-m em { font-style: normal; font-weight: 800; color: var(--text); }
.sortcard.right .mch-beep, .mch-beep.right { border-color: var(--mint); }

/* work vs free time */
.mch-bars { display: flex; justify-content: center; align-items: flex-end; gap: 36px; height: 220px; width: 100%; max-width: 300px; }
.mch-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; width: 96px; }
.mch-fill { display: block; width: 72px; height: 0; border-radius: 12px 12px 4px 4px; background: linear-gradient(var(--gold), var(--gold-deep)); transition: height 1.1s cubic-bezier(.3,.8,.3,1); }
.mch-bar:nth-child(2) .mch-fill { background: linear-gradient(#b7b3c6, #807c92); }
.mch-bars.on .mch-fill { height: calc(var(--h) * 2.6px); }
.mch-bar em { order: -1; font: 800 22px var(--sans); font-style: normal; color: var(--text); opacity: 0; transition: opacity .3s .9s; }
.mch-bars.on .mch-bar em { opacity: 1; }
.mch-bar span { font: 700 15px var(--sans); color: var(--dim); }
.mch-cap { font: 600 13px var(--sans); color: var(--dim); }

@media (max-height: 700px) {
  .mch-pic img { max-height: 210px; }
  .mch-pic.mch-small img { max-height: 140px; }
  .mch-bars { height: 180px; }
  .mch-bars.on .mch-fill { height: calc(var(--h) * 2px); }
}
