/* 움직임 30 — keywords.css의 시리즈 틀 위에 움직임 무대와 데모 모양만 더한다.
   데모 움직임은 Web Animations로 재생해서 '동작 줄이기'에서도 멈추지 않는다. */
.mw { --mw-ink: #1a1433; --mw-line: rgba(52, 36, 110, 0.18); --mw-soft: #f4f2fa; --mw-violet: #6447d1; }
.mw [hidden] { display: none !important; }

/* ── 목록 ── */
.mw .mw-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mw .mw-card { min-height: 116px; padding-top: 12px; }
.mw-card__icon {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: 6px; border-radius: 6px;
  background: var(--kw-t); color: var(--kw-c); font-size: 17px;
}
.mw .mw-card .kw-card__n { position: absolute; top: 12px; right: 12px; }
.mw .mw-card.is-known .kw-card__n { display: none; }
.mw .mw-card.is-known .mw-card__icon { background: #fff; }

/* ── 움직임 무대 ── */
.mw-stage {
  border: 1px solid var(--mw-line); border-radius: 8px; overflow: hidden;
  background: #fff;
}
.mw-view {
  position: relative; height: 250px; overflow: hidden;
  background-color: #fbfaff;
  background-image: radial-gradient(rgba(75, 47, 160, 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
}
.mw-stage--quiz { margin-top: 14px; }
.mw-stage--quiz .mw-view { height: 270px; background-color: #fff; }
.mw-host {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; color: var(--mw-ink); font-size: 15px;
}
.mw-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-top: 1px solid var(--mw-line); background: #fff;
}
.mw-replay {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 38px; padding: 0 14px; border: 0; border-radius: 6px;
  background: var(--kw-c); color: #fff; font-size: 14px; font-weight: 900; cursor: pointer;
}
.mw-replay:hover { filter: brightness(1.08); }
.mw-replay:focus-visible { outline: 3px solid var(--kw-c); outline-offset: 2px; }
.mw-readout {
  flex: 0 1 auto; min-width: 0;
  font-size: 13.5px; font-weight: 800; color: var(--kw-d, var(--mw-ink));
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.mw-readout > span { white-space: nowrap; }
.mw-track { flex: 1 1 40px; min-width: 32px; height: 6px; border-radius: 3px; background: var(--kw-t); overflow: hidden; }
.mw-track > span { display: block; height: 100%; background: var(--kw-c); transform: scaleX(0); transform-origin: left center; }
.mw-track.is-loop > span { transform: none; opacity: 0.35; }

.mw-opts { display: grid; gap: 10px; }
.mw-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mw-opt__label { font-size: 15px; font-weight: 800; color: var(--kw-ink); }
.mw-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--mw-line); border-radius: 6px; overflow: hidden; background: #fff; }
.mw-seg button {
  min-height: 38px; padding: 0 12px; border: 0; border-left: 1px solid var(--mw-line);
  background: transparent; color: var(--kw-ink); font-size: 14px; font-weight: 700; cursor: pointer;
}
.mw-seg button:first-child { border-left: 0; }
.mw-seg button[aria-pressed="true"] { background: var(--kw-c); color: #fff; }
.mw-seg button:focus-visible { outline: 3px solid var(--kw-c); outline-offset: -3px; }
.mw-switch {
  position: relative; flex: none; width: 48px; height: 28px; padding: 0;
  border: 0; border-radius: 6px; background: #c9c4da; cursor: pointer; transition: background 0.2s;
}
.mw-switch__knob {
  position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 4px;
  background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22); transition: transform 0.2s;
}
.mw-switch[aria-checked="true"] { background: var(--kw-c); }
.mw-switch[aria-checked="true"] .mw-switch__knob { transform: translateX(20px); }
.mw-switch:focus-visible { outline: 3px solid var(--kw-c); outline-offset: 2px; }
/* ── 한 장 카드: 왼쪽 무대 ──
   공용 .kw-focus 틀 안에서 데모 칸과 '다시 보기·지금 수치' 막대를 크게 둔다. */
.mw-stage--focus {
  width: 100%; max-width: 620px;
  border-radius: 10px; box-shadow: 0 18px 36px -28px rgba(26, 20, 51, 0.55);
}
.mw-stage--focus .mw-view { height: clamp(260px, calc(100vh - 380px), 420px); background-color: #fff; }
.mw-stage--focus .mw-bar { gap: 12px; padding: 10px 12px; }
.mw-stage--focus .mw-replay { min-height: 48px; padding: 0 18px; font-size: 16px; border-radius: 8px; }
.mw-stage--focus .mw-readout { font-size: 16px; font-weight: 900; }
.mw-stage--focus .mw-track { height: 8px; border-radius: 4px; }
/* 스위치는 공용 칸 높이에 맞춘다 */
.mw .kw-focus__opt--switch { min-height: 44px; }
/* 컴퓨터 폭: 설정 이름을 단추 줄 왼쪽에 두어 한 줄로 줄인다(1366×768에서도 스크롤 없이). */
@media (min-width: 861px) {
  .mw .kw-focus__opt { margin-top: 10px; }
  .mw .kw-focus__opt:not(.kw-focus__opt--switch) { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); align-items: center; gap: 12px; }
  .mw .kw-focus__opt:not(.kw-focus__opt--switch) .kw-focus__opt-label { margin: 0; line-height: 1.3; }
}
/* ease-in-out 같은 값이 단추 안에서 쪼개지지 않게 */
.mw .kw-focus__seg button { padding: 0 6px; white-space: nowrap; }
.mw .kw-focus__seg button:first-child:nth-last-child(4),
.mw .kw-focus__seg button:first-child:nth-last-child(4) ~ button { font-size: 14px; }

/* ── 데모 공통 조각 ── */
.mwd-line { display: block; height: 8px; border-radius: 3px; background: #e6e2f1; margin-top: 7px; width: 100%; }
.mwd-line--short { width: 62%; }
.mwd-note { margin: 0; min-height: 1.4em; font-size: 13.5px; font-weight: 700; color: #6a6384; text-align: center; }
.mwd-label { font-size: 15px; font-weight: 900; color: var(--mw-ink); }
.mwd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mwd-row--between { justify-content: space-between; width: 100%; }
.mwd-cursor {
  position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none; opacity: 0;
  font-size: 22px; color: #1d1840; filter: drop-shadow(0 2px 2px rgba(255, 255, 255, 0.9));
}
.mwd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 2px solid #4b2fa0; border-radius: 8px;
  background: #4b2fa0; color: #fff; font-size: 16px; font-weight: 800; cursor: pointer;
}
.mwd-btn:focus-visible { outline: 3px solid rgba(75, 47, 160, 0.45); outline-offset: 2px; }
.mwd-btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.mwd-btn--lg { min-height: 58px; padding: 0 34px; font-size: 19px; }
.mwd-btn--outline { background: #fff; color: #4b2fa0; }
.mwd-card {
  position: relative; width: min(100%, 240px); padding: 14px;
  border: 1px solid var(--mw-line); border-radius: 8px; background: #fff;
  box-shadow: 0 10px 22px -16px rgba(26, 20, 51, 0.6);
}
.mwd-card strong { display: block; font-size: 16px; font-weight: 900; }
.mwd-card--wide { width: min(100%, 300px); }
.mwd-card__icon {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 8px;
  border-radius: 6px; background: var(--kw-t); color: var(--kw-c); font-size: 16px;
}
.mwd-notice {
  display: flex; align-items: center; gap: 12px; width: min(100%, 290px); padding: 14px 16px;
  border-radius: 8px; background: #1d1840; color: #fff; box-shadow: 0 14px 26px -14px rgba(29, 24, 64, 0.8);
}
.mwd-notice > i { color: #ffd66b; font-size: 20px; }
.mwd-notice strong { display: block; font-size: 13px; color: #c9bcff; }
.mwd-notice span { font-size: 15px; font-weight: 700; }
.mwd-notice--sm { width: 100%; padding: 10px 12px; gap: 8px; }
.mwd-notice--sm > i { font-size: 16px; }
.mwd-photo, .mwd-scene {
  position: relative; overflow: hidden; border-radius: 8px;
  background: linear-gradient(180deg, #8fc9f2 0%, #d9efff 100%);
}
.mwd-photo { width: min(100%, 260px); aspect-ratio: 16 / 10; box-shadow: 0 12px 24px -16px rgba(26, 20, 51, 0.7); }
.mwd-photo__sun { position: absolute; top: 18%; right: 18%; width: 34px; height: 34px; border-radius: 50%; background: #ffd66b; }
.mwd-photo__hill { position: absolute; left: -10%; right: 30%; bottom: -30%; height: 70%; border-radius: 50% 50% 0 0; background: #4fb39c; }
.mwd-photo__hill--b { left: 35%; right: -15%; height: 58%; background: #2f8f7a; }

/* 1 나타나고 사라지기 */
.mwd-pagebg { position: absolute; inset: 22px 30px; padding: 12px; border-radius: 8px; background: #fff; border: 1px solid var(--mw-line); opacity: 0.7; }
.mwd-pop-box {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 34px; border-radius: 8px; background: #fff; box-shadow: 0 20px 40px -18px rgba(26, 20, 51, 0.65);
}
.mwd-pop-box__check { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #e2f4f0; color: #0d8577; font-size: 22px; }
.mwd-pop-box strong { font-size: 17px; font-weight: 900; }
.mwd-slot { position: relative; width: min(calc(100% - 90px), 240px); }
.mwd-ghost { position: absolute; inset: 0; border: 2px dashed rgba(100, 71, 209, 0.35); border-radius: 8px; }
.mwd-slot .mwd-card { width: 100%; }
.mwd-ruler {
  position: absolute; top: 100%; right: -22px; width: 12px;
  border: 2px solid var(--kw-c); border-left: 0; border-radius: 0 3px 3px 0;
}
.mwd-ruler b { position: absolute; top: 50%; left: calc(100% + 4px); transform: translateY(-50%); font-size: 11px; color: var(--kw-d); white-space: nowrap; }
.mwd-acc { align-self: flex-start; width: min(100%, 320px); margin-top: 8px; border: 1px solid var(--mw-line); border-radius: 8px; background: #fff; overflow: hidden; }
.mwd-acc__head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 48px; padding: 0 14px; border: 0; background: #fff; color: var(--mw-ink);
  font-size: 16px; font-weight: 900; cursor: pointer;
}
.mwd-acc__head:focus-visible { outline: 3px solid var(--kw-c); outline-offset: -3px; }
.mwd-acc__head i { color: var(--kw-c); }
.mwd-acc__wrap { overflow: hidden; }
.mwd-acc__inner { padding: 4px 14px 14px; border-top: 1px solid var(--mw-line); background: var(--kw-t); }
.mwd-acc__inner p { margin: 8px 0 0; font-size: 14.5px; }
.mwd-acc__inner b { display: inline-block; min-width: 52px; color: var(--kw-d); }
.mwd-todo { width: min(100%, 300px); margin: 0; padding: 0; list-style: none; }
.mwd-todo li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 6px; padding: 8px 8px 8px 14px; overflow: hidden;
  border: 1px solid var(--mw-line); border-radius: 6px; background: #fff; font-size: 15px; font-weight: 700;
}
.mwd-todo button { flex: none; width: 32px; height: 32px; border: 0; border-radius: 6px; background: #fdeaec; color: #c2414b; cursor: pointer; }
.mwd-rows { width: min(100%, 300px); margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.mwd-rows li { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-radius: 6px; background: #fff; border: 1px solid var(--mw-line); font-size: 14px; }
.mwd-rows li i { width: 18px; text-align: center; color: var(--kw-c); }
.mwd-rows li strong { flex: none; width: 36px; }
.mwd-rows .mwd-line { margin: 0; }

/* 2 옮겨 가기 */
.mwd-pager { width: min(100%, 300px); }
.mwd-pager__view { position: relative; height: 150px; overflow: hidden; border-radius: 8px; }
.mwd-pager__page {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--kw-t); color: var(--kw-d);
}
.mwd-pager__page i { font-size: 38px; color: var(--kw-c); }
.mwd-pager__page strong { font-size: 18px; font-weight: 900; }
.mwd-pager__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.mwd-dots { display: flex; gap: 6px; }
.mwd-dots i { width: 8px; height: 8px; border-radius: 2px; background: #d6d0ea; }
.mwd-dots i.is-on { background: #4b2fa0; width: 20px; }
.mwd-xf { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 280px); }
.mwd-xf__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; box-shadow: 0 12px 24px -16px rgba(26, 20, 51, 0.7); }
.mwd-scene { position: absolute; inset: 0; border-radius: 0; }
.mwd-scene > i { position: absolute; top: 16%; right: 16%; font-size: 30px; color: #ffd66b; }
.mwd-scene > b { position: absolute; left: 10px; top: 8px; padding: 2px 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.85); font-size: 12px; color: #1d1840; }
.mwd-scene--dusk { background: linear-gradient(180deg, #f59e7b 0%, #fcd9a8 100%); }
.mwd-scene--dusk > i { color: #fff3c4; }
.mwd-scene--night { background: linear-gradient(180deg, #221763 0%, #4b3a9b 100%); }
.mwd-scene--night > i { color: #f6f1d2; }
.mwd-scene--night .mwd-photo__hill { background: #2d5f73; }
.mwd-scene--night .mwd-photo__hill--b { background: #1d4656; }
.mwd-cx { position: relative; width: min(100%, 320px); height: 210px; }
.mwd-cx__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 100%; }
.mwd-cx__card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 8px; background: var(--kw-t); color: var(--kw-d); cursor: pointer;
  font-size: 15px; font-weight: 900;
}
.mwd-cx__card i { font-size: 24px; color: var(--kw-c); }
.mwd-cx__card:focus-visible { outline: 3px solid var(--kw-c); outline-offset: 2px; }
.mwd-cx__sheet {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 2; overflow: hidden;
  border-radius: 8px; background: var(--kw-t); box-shadow: 0 18px 34px -16px rgba(26, 20, 51, 0.7);
}
.mwd-cx__sheet-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; background: var(--kw-c); color: #fff; }
.mwd-cx__sheet-head strong { flex: 1; font-size: 16px; white-space: nowrap; }
.mwd-cx__close { flex: none; width: 34px; height: 34px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.2); color: #fff; cursor: pointer; }
.mwd-cx__sheet-body { padding: 6px 14px; }
.mwd-cx__sheet-body .mwd-line { background: rgba(255, 255, 255, 0.85); height: 10px; margin-top: 12px; }
.mwd-scroller {
  position: relative; width: min(100%, 320px); height: 218px; overflow-y: auto; overflow-x: hidden;
  padding: 10px; border: 1px solid var(--mw-line); border-radius: 8px; background: #fff;
  overscroll-behavior: contain;
}
.mwd-scroller:focus-visible { outline: 3px solid var(--kw-c); outline-offset: 2px; }
.mwd-scroller__hint { margin: 0; height: 190px; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #6a6384; }
.mwd-reveal { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 18px 14px; border-radius: 8px; background: var(--kw-t); color: var(--kw-d); }
.mwd-reveal i { font-size: 20px; color: var(--kw-c); }
.mwd-px { padding: 0; }
.mwd-px__inner { position: relative; height: 560px; }
.mwd-px__back { position: absolute; left: 0; right: 0; top: 0; height: 560px; background: linear-gradient(180deg, #2c1b6b 0%, #6447d1 55%, #f0a3c0 100%); will-change: transform; }
.mwd-px__moon { position: absolute; top: 26px; right: 40px; width: 36px; height: 36px; border-radius: 50%; background: #fff3c4; box-shadow: 0 0 24px 4px rgba(255, 243, 196, 0.6); }
.mwd-px__mt { position: absolute; bottom: 342px; width: 72%; height: 130px; background: #8d76e4; clip-path: polygon(0 100%, 45% 8%, 100% 100%); }
.mwd-px__mt--a { left: -12%; z-index: 1; }
.mwd-px__mt--b { right: -14%; height: 104px; background: #b9a6f2; clip-path: polygon(0 100%, 55% 0, 100% 100%); }
.mwd-px__front { position: relative; padding: 120px 14px 14px; }
.mwd-px__title { margin: 0 0 10px; color: #fff; font-size: 20px; font-weight: 900; text-shadow: 0 2px 8px rgba(29, 24, 64, 0.6); }
.mwd-px__card { margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.94); }
.mwd-px__card .mwd-line:first-child { margin-top: 0; }
.mwd-drag { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.mwd-drag__slot { position: absolute; width: 132px; height: 60px; border: 2px dashed rgba(13, 133, 119, 0.45); border-radius: 8px; }
.mwd-drag__no { position: absolute; top: 14px; right: 14px; color: #c2414b; opacity: 0.4; font-size: 20px; }
.mwd-drag__card {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 132px; height: 60px; border: 0; border-radius: 8px; background: var(--kw-c); color: #fff;
  font-size: 16px; font-weight: 900; cursor: grab; touch-action: none; user-select: none;
  box-shadow: 0 10px 20px -12px rgba(26, 20, 51, 0.8);
}
.mwd-drag__card.is-drag { cursor: grabbing; box-shadow: 0 22px 30px -14px rgba(26, 20, 51, 0.8); }
.mwd-drag__card:focus-visible { outline: 3px solid #1d1840; outline-offset: 3px; }

/* 3 손에 반응하기 */
.mwd-hover { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.mwd-hcard {
  display: flex; flex-direction: column; align-items: flex-start; width: 190px; padding: 16px;
  border: 1px solid var(--mw-line); border-radius: 8px; background: #fff; color: var(--mw-ink); text-align: left; cursor: pointer;
  box-shadow: 0 2px 6px rgba(26, 20, 51, 0.12);
}
.mwd-hcard strong { font-size: 17px; font-weight: 900; }
.mwd-hcard__sub { font-size: 13px; font-weight: 700; color: #6a6384; }
.mwd-hcard:focus-visible { outline: 3px solid var(--kw-c); outline-offset: 3px; }
.mwd-rbtn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px;
  min-height: 60px; padding: 0 40px; border: 0; border-radius: 8px; font-size: 18px; font-weight: 900; cursor: pointer;
}
.mwd-rbtn--white { background: #4b2fa0; color: #fff; }
.mwd-rbtn--violet { background: #ece8fb; color: #2c1b6b; }
.mwd-rbtn:focus-visible { outline: 3px solid rgba(75, 47, 160, 0.45); outline-offset: 3px; }
.mwd-ripple { position: absolute; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%) scale(0); }
.mwd-rbtn--white .mwd-ripple { background: #fff; }
.mwd-rbtn--violet .mwd-ripple { background: #6447d1; }
.mwd-quizbox { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mwd-input {
  width: 110px; min-height: 46px; padding: 0 12px; border: 2px solid var(--mw-line); border-radius: 8px;
  font: inherit; font-size: 18px; font-weight: 800; text-align: center; color: var(--mw-ink); background: #fff;
}
.mwd-input:focus { outline: 0; border-color: #4b2fa0; }
.mwd-input.is-wrong { border-color: #c2414b; background: #fdeaec; }
.mwd-input.is-right { border-color: #0d8577; background: #e2f4f0; }
.mwd-like { display: flex; align-items: center; gap: 12px; }
.mwd-heart {
  position: relative; display: grid; place-items: center; width: 72px; height: 72px;
  border: 2px solid var(--mw-line); border-radius: 8px; background: #fff; color: #bf3f73; font-size: 32px; cursor: pointer;
}
.mwd-heart > i { display: block; }
.mwd-heart[aria-pressed="true"] { border-color: #bf3f73; background: #fbe6ee; color: #d6336c; }
.mwd-heart:focus-visible { outline: 3px solid rgba(191, 63, 115, 0.45); outline-offset: 2px; }
.mwd-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.mwd-burst i { position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 50%; background: #f472b6; opacity: 0; transform: translate(-50%, -50%); }
.mwd-burst i:nth-child(2n) { background: #fbbf24; }
.mwd-like__n { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.mwd-focus { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mwd-key {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid #c9c4da; border-bottom-width: 3px; border-radius: 6px; background: #fff;
  font-size: 14px; font-weight: 900; color: #4a4362;
}
.mwd-fbtn:focus { outline: 0; }
.mwd-row .mwd-fbtn { min-width: 74px; }

/* 4 속도와 리듬 */
.mwd-lanes { display: grid; gap: 12px; width: 100%; max-width: 380px; }
.mwd-lane-wrap { display: grid; gap: 4px; }
.mwd-lane-label { font-size: 12.5px; font-weight: 800; color: #6a6384; }
.mwd-lane-label b { color: var(--kw-d); font-size: 13.5px; }
.mwd-lane { position: relative; height: 44px; padding: 6px; border-radius: 8px; background: var(--kw-t); overflow: hidden; }
.mwd-lane--ref { background: #eeecf4; }
.mwd-ball { display: block; width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0, var(--kw-c) 45%, var(--kw-d, var(--kw-c)) 100%); box-shadow: 0 4px 8px -3px rgba(26, 20, 51, 0.5); }
.mwd-ball--ref { background: radial-gradient(circle at 35% 30%, #fff 0, #a29cbc 50%, #7d7799 100%); }
.mwd-clock { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; font-weight: 800; color: var(--mw-ink); }
.mwd-clock b { font-size: 22px; font-variant-numeric: tabular-nums; color: var(--kw-d); min-width: 3.2ch; }
.mwd-tip { margin-left: 6px; padding: 3px 8px; border-radius: 4px; background: var(--kw-t); color: var(--kw-d); font-size: 13px; }
.mwd-ease { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 420px; }
.mwd-ease .mwd-lanes { flex: 1; min-width: 0; }
.mwd-mini { flex: none; width: 92px; height: 92px; }
.mwd-mini rect { fill: #fff; stroke: var(--mw-line); }
.mwd-mini line { stroke: #b9b3cf; stroke-dasharray: 3 3; }
.mwd-mini path { fill: none; stroke: var(--kw-c); stroke-width: 3; stroke-linecap: round; }
.mwd-mini circle { fill: var(--kw-d, var(--kw-c)); stroke: #fff; stroke-width: 2; }
.mwd-delay { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 340px; }
.mwd-delay .mwd-card { width: 100%; }
.mwd-d-desc { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #4a4362; }
.mwd-gantt { position: relative; width: 100%; display: grid; gap: 6px; }
.mwd-gantt__row { display: flex; align-items: center; }
.mwd-gantt__row > span { flex: none; width: 56px; font-size: 12.5px; font-weight: 800; color: #6a6384; }
.mwd-gantt__row > div { position: relative; flex: 1; height: 14px; border-radius: 3px; background: #eeecf4; }
.mwd-gantt__row i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--kw-c); }
.mwd-gantt__row em { position: absolute; left: 0; top: 6px; height: 2px; background: repeating-linear-gradient(90deg, var(--kw-c) 0 4px, transparent 4px 8px); }
.mwd-gantt__head { position: absolute; top: -4px; bottom: -4px; left: 56px; width: 2px; background: #1d1840; }
.mwd-spring { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 380px; height: 100%; }
.mwd-spring__col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mwd-spring__drop { flex: 1; display: flex; align-items: center; padding: 0 8px; border-radius: 8px; background: var(--kw-t); overflow: hidden; }
.mwd-loop { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mwd-more { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--kw-d); font-size: 14px; font-weight: 900; }
.mwd-more i { font-size: 22px; color: var(--kw-c); }
.mwd-rm { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; height: 100%; }
.mwd-rm__stage { flex: 1; width: 100%; display: grid; place-items: center; overflow: hidden; }
.mwd-seg { display: inline-flex; border: 1px solid var(--mw-line); border-radius: 6px; overflow: hidden; background: #fff; }
.mwd-seg button { min-height: 36px; padding: 0 12px; border: 0; border-left: 1px solid var(--mw-line); background: transparent; font-size: 13.5px; font-weight: 800; color: var(--mw-ink); cursor: pointer; }
.mwd-seg button:first-child { border-left: 0; }
.mwd-seg button[aria-pressed="true"] { background: #1d1840; color: #fff; }
.mwd-seg button:focus-visible { outline: 3px solid var(--kw-c); outline-offset: -3px; }

/* 5 기다림과 흐름 */
.mwd-panel { width: min(100%, 300px); border: 1px solid var(--mw-line); border-radius: 8px; background: #fff; overflow: hidden; }
.mwd-panel__head { padding: 10px 14px; border-bottom: 1px solid var(--mw-line); font-size: 15px; font-weight: 900; }
.mwd-panel__head i { color: var(--kw-c); margin-right: 4px; }
.mwd-panel__body { height: 148px; display: grid; place-items: center; }
.mwd-spin { display: grid; place-items: center; }
.mwd-ring { display: block; width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--kw-t); border-top-color: var(--kw-c); border-right-color: var(--kw-c); }
.mwd-dots3 { display: flex; gap: 8px; }
.mwd-dots3 i { width: 13px; height: 13px; border-radius: 50%; background: var(--kw-c); }
.mwd-files { width: 100%; margin: 0; padding: 4px 14px; list-style: none; align-self: start; }
.mwd-files li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--mw-line); font-size: 14.5px; font-weight: 700; }
.mwd-files li:last-child { border-bottom: 0; }
.mwd-files i { color: var(--kw-c); width: 16px; text-align: center; }
.mwd-panel--skel { padding: 6px 14px; }
.mwd-skel { margin: 0; padding: 0; list-style: none; }
.mwd-skel li { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.mwd-bone { position: relative; display: block; overflow: hidden; height: 12px; border-radius: 3px; background: #e7e4ef; }
.mwd-bone > i { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0) 100%); transform: translateX(-100%); }
.mwd-bone--sq { flex: none; width: 40px; height: 40px; border-radius: 6px; }
.mwd-bone--short { width: 55%; margin-top: 8px; }
.mwd-bone-col { flex: 1; min-width: 0; }
.mwd-real-icon { display: grid; place-items: center; background: var(--kw-t); color: var(--kw-c); font-size: 17px; }
.mwd-real-icon > i { position: static; inset: auto; background: none; transform: none; }
.mwd-skel--real strong { display: block; font-size: 15px; font-weight: 900; }
.mwd-skel--real small { display: block; margin-top: 2px; font-size: 13px; color: #6a6384; font-weight: 700; }
.mwd-upload { width: min(100%, 320px); display: grid; gap: 10px; }
.mwd-upload .mwd-label i { color: var(--kw-c); }
.mwd-pct { font-size: 18px; font-weight: 900; color: var(--kw-d); font-variant-numeric: tabular-nums; }
.mwd-bar { height: 16px; border-radius: 4px; background: var(--kw-t); overflow: hidden; }
.mwd-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--kw-c), var(--kw-d, var(--kw-c))); transform: scaleX(0); transform-origin: left center; }
.mwd-count { display: grid; justify-items: center; gap: 6px; }
.mwd-count__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 8px; background: var(--kw-t); color: var(--kw-c); font-size: 22px; }
.mwd-count__label { font-size: 15px; font-weight: 800; color: #6a6384; }
.mwd-count__num { min-width: 5ch; text-align: center; font-size: 52px; line-height: 1.05; font-weight: 900; color: var(--kw-d); font-variant-numeric: tabular-nums; }
.mwd-chat { display: flex; align-items: flex-start; gap: 10px; width: min(100%, 340px); }
.mwd-chat__ai { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #1d1840; color: #c9bcff; font-size: 18px; }
.mwd-chat__bubble { flex: 1; min-height: 76px; margin: 0; padding: 12px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--mw-line); font-size: 15.5px; line-height: 1.6; font-weight: 600; }
.mwd-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.15em; background: var(--kw-c); }
.mwd-party { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.mwd-score { display: grid; justify-items: center; gap: 2px; padding: 14px 26px; border-radius: 8px; background: #fff; box-shadow: 0 14px 26px -16px rgba(26, 20, 51, 0.6); }
.mwd-score i { color: #e0a43a; font-size: 26px; }
.mwd-score b { font-size: 28px; font-weight: 900; color: var(--kw-d); }
.mwd-score span { font-size: 14px; font-weight: 800; color: #6a6384; }
.mwd-party__layer { position: absolute; left: 50%; bottom: 12px; width: 0; height: 0; pointer-events: none; }
.mwd-party__layer i { position: absolute; left: -4px; top: -6px; width: 8px; height: 12px; border-radius: 2px; opacity: 0; }
.mwd-party__layer i.is-round { width: 9px; height: 9px; border-radius: 50%; }

/* ── 속도 곡선 놀이터 ── */
.mw .mw-curve { max-width: 1080px; }
.mw-cv__presets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 16px 0 18px; }
.mw-cv__presets button {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 84px; padding: 8px 6px; border: 2px solid var(--kw-line); border-radius: 8px;
  background: #fff; color: var(--kw-ink); font-size: 13.5px; font-weight: 800; cursor: pointer;
}
.mw-cv__presets button svg { width: 40px; height: 40px; }
.mw-cv__presets button path { fill: none; stroke: #6447d1; stroke-width: 3; stroke-linecap: round; }
.mw-cv__presets button[aria-pressed="true"] { border-color: #4b2fa0; background: #efebfb; }
.mw-cv__presets button:focus-visible { outline: 3px solid rgba(75, 47, 160, 0.45); outline-offset: 2px; }
.mw-cv__main { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 22px; align-items: start; }
.mw-cv__graph { min-width: 0; }
.mw-cv__svg { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; touch-action: none; user-select: none; }
.mw-cv__over { fill: #f6f4fb; }
.mw-cv__plot { fill: #fff; stroke: rgba(52, 36, 110, 0.18); }
.mw-cv__diag { stroke: #b9b3cf; stroke-width: 2; stroke-dasharray: 5 5; }
.mw-cv__axis { font-size: 12px; font-weight: 800; fill: #6a6384; }
.mw-cv__arm { stroke: #a78bfa; stroke-width: 2; }
.mw-cv__path { fill: none; stroke: #4b2fa0; stroke-width: 5; stroke-linecap: round; }
.mw-cv__end { fill: #4b2fa0; }
.mw-cv__marker { fill: #fbbf24; stroke: #fff; stroke-width: 3; pointer-events: none; }
.mw-cv__handle { cursor: grab; outline: none; }
.mw-cv__hit { fill: transparent; }
.mw-cv__dot { fill: #fff; stroke: #6447d1; stroke-width: 4; }
.mw-cv__handle:hover .mw-cv__dot, .mw-cv__handle.is-drag .mw-cv__dot { fill: #ece8fb; }
.mw-cv__handle:focus-visible .mw-cv__hit { fill: rgba(100, 71, 209, 0.18); stroke: #4b2fa0; stroke-width: 2; }
.mw-cv__keys { margin: 6px 0 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--kw-muted); }
.mw-cv__side { display: grid; gap: 16px; min-width: 0; }
.mw-cv__lanes { display: grid; gap: 10px; }
.mw-cv__lanes .mwd-lane { height: 52px; padding: 8px 0; --kw-c: #6447d1; --kw-t: #ece8fb; --kw-d: #47309f; }
.mw-cv__lanes .mwd-ball { width: 36px; height: 36px; }
.mw-cv__lanes .mwd-lane--ref { background: #eeecf4; }
.mw-cv__play { justify-self: start; }
.mw-cv__value { padding: 14px; border-radius: 8px; background: #efebfb; }
.mw-cv__value code { display: block; font-size: 16px; font-weight: 900; color: #2c1b6b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.mw-cv__value p { margin: 6px 0 0; font-size: 16px; font-weight: 800; line-height: 1.5; color: var(--kw-ink); }
.mw-cv__say { margin-top: 20px; }
.mw-cv .mw-opt { justify-content: flex-start; }
.mw-cv .mw-seg button[aria-pressed="true"] { background: #4b2fa0; }

/* ── 반응형 ── */
@media (max-width: 960px) {
  .mw-cv__presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mw-cv__main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .mw .mw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mw .mw-card { min-height: 104px; }
  .mw-opt { align-items: flex-start; flex-direction: column; gap: 6px; }
  .mw-view { height: 240px; }
  .mw-host { padding: 12px; }
  .mwd-ease { flex-direction: column-reverse; gap: 8px; }
  .mwd-mini { width: 72px; height: 72px; }
  .mw-cv__presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mw-cv__presets button { flex-direction: row; justify-content: flex-start; min-height: 52px; padding: 6px 10px; text-align: left; }
  .mw-cv__presets button svg { flex: none; width: 32px; height: 32px; }
}
@media (max-width: 360px) {
  .mw .mw-grid { grid-template-columns: minmax(0, 1fr); }
  .mw-readout { font-size: 12.5px; }
}
/* 휴대폰 카드: 무대는 짧게. 동작 줄이기에서도 무대 데모는 Web Animations로 그대로 재생한다. */
@media (max-width: 860px) {
  /* 공용 카드의 max-height(800px)가 휴대폰에서 아래쪽(AI 문장·넘기기)을 잘라서 여기서 푼다. */
  .mw .kw-browse.is-focus .kw-focus__card { max-height: none; }
  .mw-stage--focus .mw-view { height: 230px; }
  .mw-stage--focus .mw-bar { flex-wrap: wrap; }
  .mw-stage--focus .mw-replay { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .mw-stage--focus .mw-readout { flex: 1 1 0; min-width: 0; font-size: 14.5px; }
  .mw-stage--focus .mw-track { flex-basis: 100%; }
}
/* 퀴즈에서는 답을 고르기 전까지 수치 설명을 숨긴다(이름 힌트가 될 수 있어서). */
.mw-stage--quiz:not(.is-answered) .mw-readout { visibility: hidden; }
