* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font-family: HarmonyOS Sans SC;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: #232329;
  overflow-x: hidden;
}

#mc {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.mc-frame {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  padding: max(10px, env(safe-area-inset-top, 0px)) 0 max(10px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #efc3de, #c6eef3);
}

.mc-wall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
  pointer-events: none;
}

.mc-pulse {
  position: absolute;
  top: 34px;
  right: -16px;
  width: 138px;
  opacity: .9;
}

.mc-head {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 4px;
  flex-shrink: 0;
}

.mc-head--plain {
  margin-bottom: 18px;
}

.mc-headline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mc-headline img {
  height: 26px;
}

.mc-headline .mc-cap {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  font-style: italic;
  letter-spacing: .5px;
  color: #1e1e1e;
}

.mc-note {
  margin: 10px 0 15px;
  color: #1e1e1e;
  font-size: 13px;
}

.mc-langs {
  display: flex;
  justify-content: center;
  margin: 8px 0 2px;
}

.mc-lang-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(30, 30, 30, .25);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, .7);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231e1e1e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  color: #1e1e1e;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  padding: 6px 30px 6px 14px;
  cursor: pointer;
}

.mc-flow {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 8px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.mc-card {
  width: 100%;
  min-height: min(480px, calc(100dvh - 200px));
  padding: 0;
  background: url('./m/c.png') no-repeat center;
  background-size: 100% 100%;
  display: flex;
  justify-content: center;
}

.mc-card .mc-body {
  position: relative;
  z-index: 1;
  width: 270px;
  padding: 75px 8px 0 20px;
}

.mc-asktext {
  margin: 0 0 12px;
  color: #2a2235;
  font-size: clamp(15px, 4.2vw, 20px);
  line-height: 1.55;
  font-weight: 700;
  min-height: 0;
}

.mc-card h2 {
  margin: 0 0 10px;
  color: #f2009d;
  font-size: 20px;
  line-height: 1.05;
  font-style: italic;
  letter-spacing: .2px;
}

.mc-quest {
  margin: 0 0 14px;
  color: #222;
  font-size: 14px;
  height: 38px;
  font-weight: 700;
}

.mc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 12px;
}

.mc-item {
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  color: #222;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.mc-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid transparent;
  display: block;
  margin-bottom: 4px;
}

.mc-item.mc-item--on img {
  border-color: #f2009d;
}

.mc-wait {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 136px;
}

.mc-wait h2 {
  margin: 0;
  align-self: flex-start;
  color: #f2009d;
  font-size: 14px;
  line-height: 1.05;
  font-style: italic;
}

.mc-wait--mid {
  width: 100%;
  padding-top: 0;
  min-height: 430px;
  justify-content: center;
  transform: translateY(-24px);
}

.mc-wait p {
  margin: 0 0 20px;
  color: #1e1e1e;
  font-size: 14px;
  font-weight: 700;
}

.mc-wait--mid .mc-w1 {
  margin-bottom: 36px;
}

.mc-wait--mid .mc-w2 {
  margin-bottom: 15px;
}

.mc-wait--last {
  width: 100%;
  min-height: 430px;
  justify-content: center;
  gap: 0;
  padding-top: 0;
}

.mc-wait--last h2 {
  position: absolute;
  top: 0;
  left: 0;
}

.mc-wtext {
  margin: 0 0 15px;
  font-size: 14px;
  color: #1e1e1e;
  font-weight: 700;
}

.mc-track {
  width: min(234px, 100%);
  height: 16px;
  border-radius: 999px;
  background: #ffffffb3;
  overflow: hidden;
  margin-top: 0;
}

.mc-thumb {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f2009d, #ff60cf);
  transition: width .06s linear;
}

.mc-frame > .mc-end {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.mc-end {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  padding: 0 24px 20px;
  color: #1e1e1e;
}

.mc-end h3 {
  margin: 0 0 19px;
  font-size: 20px;
  line-height: 1.3;
}

.mc-end .mc-meta {
  margin: 0 0 35px;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 600;
}

.mc-end .mc-lead {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 500;
}

.mc-end ol {
  margin: 32px 0 0;
  padding-left: 20px;
  color: #555;
}

.mc-end li {
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.mc-line {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.mc-line strong {
  font-size: 22px;
}

.mc-avatar {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: #b4b4b499;
  cursor: pointer;
}

.mc-frame > footer.mc-actions {
  flex-shrink: 0;
  margin-top: 8px;
  padding-bottom: max(4px, env(safe-area-inset-bottom, 0px));
}

.mc-actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

.mc-action {
  width: 132px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #1e1e1e;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}

.mc-actions--ask {
  margin-top: 16px;
}

.mc-actions--ask .mc-action {
  height: 46px;
  font-size: 16px;
}

.mc-card.mc-card--ask {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.mc-card--ask .mc-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 290px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(130px, 22vh, 180px) 12px 0 16px;
}

.mc-card--ask .mc-actions--ask {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: auto;
  padding: 12px 12px 8px;
  flex-shrink: 0;
}

.mc-action:active {
  transform: translateY(1px);
  opacity: .95;
}

.mc-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .65);
}

.mc-loading-inner {
  width: min(300px, 80%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mc-loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, .3);
  border-top-color: #f2009d;
  border-radius: 50%;
  animation: mcspin 1s linear infinite;
}

@keyframes mcspin {
  to {
    transform: rotate(360deg);
  }
}

.mc-loading-text {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 480px) {
  .mc-frame {
    width: 100vw;
    padding: max(8px, env(safe-area-inset-top, 0px)) 0 max(8px, env(safe-area-inset-bottom, 0px));
  }

  .mc-headline .mc-cap {
    font-size: clamp(18px, 5.5vw, 24px);
  }

  .mc-headline img:not(.mc-cap) {
    height: clamp(20px, 5.5vw, 26px);
  }

  .mc-pulse {
    width: min(126px, 28vw);
    top: 22px;
  }

  .mc-card:not(.mc-card--ask) {
    min-height: min(480px, calc(100dvh - 160px));
    padding: 0;
  }

  .mc-card.mc-card--ask {
    min-height: 0;
  }

  .mc-card h2 {
    font-size: 14px;
  }

  .mc-asktext {
    font-size: clamp(14px, 4vw, 17px);
    line-height: 1.5;
    margin-bottom: 10px;
    min-height: 0;
  }

  .mc-quest {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .mc-item {
    font-size: 12px;
  }

  .mc-wait {
    padding-top: 100px;
  }

  .mc-wait h2 {
    font-size: 14px;
  }

  .mc-wait--mid {
    min-height: 390px;
    transform: translateY(-20px);
  }

  .mc-wait--last {
    min-height: 390px;
  }

  .mc-track {
    width: min(234px, 100%);
    height: 12px;
  }

  .mc-end h3 {
    font-size: 20px;
  }

  .mc-end .mc-meta {
    font-size: 15px;
  }

  .mc-end .mc-lead {
    font-size: 18px;
  }

  .mc-end li {
    font-size: 13px;
  }

  .mc-line strong {
    font-size: 16px;
  }

  .mc-action {
    width: 134px;
    height: 44px;
    font-size: 16px;
  }

  .mc-actions--ask .mc-action {
    width: 132px;
    height: 42px;
    font-size: 16px;
  }

  .mc-card--ask .mc-actions--ask {
    padding: 10px 8px 6px;
  }
}

@media (max-height: 700px) {
  .mc-note {
    margin: 6px 0 8px;
    font-size: 12px;
  }

  .mc-pulse {
    width: min(100px, 26vw);
    top: 16px;
    right: -12px;
  }

  .mc-headline {
    gap: 6px;
  }

  .mc-card:not(.mc-card--ask) .mc-body {
    padding-top: clamp(32px, 8vh, 60px);
  }
}
